Package org.infinispan.configuration.global

Examples of org.infinispan.configuration.global.GlobalConfiguration.globalJmxStatistics()


                           mappingGlobalConfigCacheManager.get(gc.transport().clusterName());
                        if (currentCacheManager == null)
                        {
                           // Use a different cache manager name to prevent naming conflict
                           configBuilder.globalJmxStatistics().cacheManagerName(
                              gc.globalJmxStatistics().cacheManagerName() + "_" + region + "_" + ctx.getName());
                           // No cache manager has been defined so far for this Cache Configuration
                           currentCacheManager =
                              new DefaultCacheManager(configBuilder.build(), holder.getDefaultConfigurationBuilder()
                                 .build(), false);
                           for (Entry<String, ConfigurationBuilder> entry : holder.getNamedConfigurationBuilders().entrySet())
View Full Code Here


      }
   }

   private JCacheManager toJCacheManager(EmbeddedCacheManager cacheManager) {
      GlobalConfiguration globalCfg = cacheManager.getCacheManagerConfiguration();
      String name = globalCfg.globalJmxStatistics().cacheManagerName();
      return new JCacheManager(URI.create(name), cacheManager, Caching.getCachingProvider());
   }

   // for proxy.
   InjectedCacheResolver() {
View Full Code Here

      }
   }

   private JCacheManager toJCacheManager(EmbeddedCacheManager cacheManager) {
      GlobalConfiguration globalCfg = cacheManager.getCacheManagerConfiguration();
      String name = globalCfg.globalJmxStatistics().cacheManagerName();
      return new JCacheManager(URI.create(name), cacheManager, Caching.getCachingProvider());
   }

   // for proxy.
   InjectedCacheResolver() {
View Full Code Here

      GlobalConfiguration gc = configBuilder.build();
      ExoContainer container = ExoContainerContext.getCurrentContainer();
      // Ensure that the cluster name won't be used between 2 ExoContainers
      configBuilder.transport().clusterName(gc.transport().clusterName() + "_" + container.getContext().getName())
         .globalJmxStatistics()
         .cacheManagerName(gc.globalJmxStatistics().cacheManagerName() + "_" + container.getContext().getName()).
         // Configure the MBeanServerLookup
         mBeanServerLookup(MBEAN_SERVER_LOOKUP);
      EmbeddedCacheManager manager;
      gc = configBuilder.build();
      String clusterName = gc.transport().clusterName();
View Full Code Here

      assertEquals("/tmp/Another-FileCacheStore-Location", loaderCfg.location());
      assertEquals(FileCacheStoreConfigurationBuilder.FsyncMode.DEFAULT, loaderCfg.fsyncMode());

      c = cm.getCacheConfiguration("withouthJmxEnabled");
      assertTrue(!c.jmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().allowDuplicateDomains());
      assertEquals("funky_domain", gc.globalJmxStatistics().domain());
      assertTrue(gc.globalJmxStatistics().mbeanServerLookup() instanceof PerThreadMBeanServerLookup);

      c = cm.getCacheConfiguration("dist");
View Full Code Here

      assertEquals(FileCacheStoreConfigurationBuilder.FsyncMode.DEFAULT, loaderCfg.fsyncMode());

      c = cm.getCacheConfiguration("withouthJmxEnabled");
      assertTrue(!c.jmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().allowDuplicateDomains());
      assertEquals("funky_domain", gc.globalJmxStatistics().domain());
      assertTrue(gc.globalJmxStatistics().mbeanServerLookup() instanceof PerThreadMBeanServerLookup);

      c = cm.getCacheConfiguration("dist");
      assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
View Full Code Here

      c = cm.getCacheConfiguration("withouthJmxEnabled");
      assertTrue(!c.jmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().allowDuplicateDomains());
      assertEquals("funky_domain", gc.globalJmxStatistics().domain());
      assertTrue(gc.globalJmxStatistics().mbeanServerLookup() instanceof PerThreadMBeanServerLookup);

      c = cm.getCacheConfiguration("dist");
      assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
      assertEquals(600000, c.clustering().l1().lifespan());
View Full Code Here

      c = cm.getCacheConfiguration("withouthJmxEnabled");
      assertTrue(!c.jmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().enabled());
      assertTrue(gc.globalJmxStatistics().allowDuplicateDomains());
      assertEquals("funky_domain", gc.globalJmxStatistics().domain());
      assertTrue(gc.globalJmxStatistics().mbeanServerLookup() instanceof PerThreadMBeanServerLookup);

      c = cm.getCacheConfiguration("dist");
      assertEquals(CacheMode.DIST_SYNC, c.clustering().cacheMode());
      assertEquals(600000, c.clustering().l1().lifespan());
      if (deprecated) assertEquals(120000, c.clustering().hash().rehashRpcTimeout());
View Full Code Here

   @Override
   public void cacheManagerStarted(GlobalComponentRegistry gcr) {
      GlobalConfiguration globalCfg = gcr.getGlobalConfiguration();
      MBeanServer mbeanServer = JmxUtil.lookupMBeanServer(globalCfg);
      String groupName = getGroupName(globalCfg);
      String jmxDomain = globalCfg.globalJmxStatistics().domain();
      Interpreter interpreter = new Interpreter();

      gcr.registerComponent(interpreter, Interpreter.class);

      // Pick up metadata from the component metadata repository
View Full Code Here

   public Map<String, Properties> getNormalizedConfigs() {
      Map<String, Properties> configurationMap = new HashMap<String, Properties>(3);
      try {
         ConfigDumpHelper configDumpHelper = service.createConfigDumpHelper();
         GlobalConfiguration global = service.cacheManager.getCacheManagerConfiguration();
         String jmxDomain = global.globalJmxStatistics().domain();
         Properties globalProperties = configDumpHelper.dumpGlobal(global, jmxDomain, service.cacheManager.getName());
         if (!globalProperties.isEmpty()) {
            configurationMap.put("global", globalProperties);
         }
         for (Map.Entry<String,Cache> cache : service.caches.entrySet()) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.