Package org.infinispan.configuration.global

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


         public void call() {
            GlobalConfiguration g = cm.getCacheManagerConfiguration();
            assertEquals("maximal", g.globalJmxStatistics().cacheManagerName());
            assertTrue(g.globalJmxStatistics().enabled());
            assertEquals("my-domain", g.globalJmxStatistics().domain());
            assertTrue(g.globalJmxStatistics().mbeanServerLookup() instanceof CustomMBeanServerPropertiesTest.TestLookup);
            assertEquals(1, g.globalJmxStatistics().properties().size());
            assertEquals("value", g.globalJmxStatistics().properties().getProperty("key"));

            // Transport
            assertEquals("maximal-cluster", g.transport().clusterName());
View Full Code Here


            GlobalConfiguration g = cm.getCacheManagerConfiguration();
            assertEquals("maximal", g.globalJmxStatistics().cacheManagerName());
            assertTrue(g.globalJmxStatistics().enabled());
            assertEquals("my-domain", g.globalJmxStatistics().domain());
            assertTrue(g.globalJmxStatistics().mbeanServerLookup() instanceof CustomMBeanServerPropertiesTest.TestLookup);
            assertEquals(1, g.globalJmxStatistics().properties().size());
            assertEquals("value", g.globalJmxStatistics().properties().getProperty("key"));

            // Transport
            assertEquals("maximal-cluster", g.transport().clusterName());
            assertEquals(120000, g.transport().distributedSyncTimeout());
View Full Code Here

            assertEquals("maximal", g.globalJmxStatistics().cacheManagerName());
            assertTrue(g.globalJmxStatistics().enabled());
            assertEquals("my-domain", g.globalJmxStatistics().domain());
            assertTrue(g.globalJmxStatistics().mbeanServerLookup() instanceof CustomMBeanServerPropertiesTest.TestLookup);
            assertEquals(1, g.globalJmxStatistics().properties().size());
            assertEquals("value", g.globalJmxStatistics().properties().getProperty("key"));

            // Transport
            assertEquals("maximal-cluster", g.transport().clusterName());
            assertEquals(120000, g.transport().distributedSyncTimeout());
            assertEquals("udp", g.transport().properties().getProperty("stack-udp"));
View Full Code Here

      loaderCfg = (SingleFileStoreConfiguration) c.persistence().stores().get(0);
      assertEquals("/tmp/Another-FileCacheStore-Location", loaderCfg.location());

      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("/tmp/Another-FileCacheStore-Location", loaderCfg.location());

      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

      GlobalConfiguration config = configBuilder.build();
      // Configure JGroups
      configureJGroups(config, configBuilder);
      // Configure the name of the cache manager
      configBuilder.globalJmxStatistics().enable()
         .cacheManagerName(config.globalJmxStatistics().cacheManagerName() + "_" + ctx.getName()).
         // Configure the MBeanServerLookup
         mBeanServerLookup(MBEAN_SERVER_LOOKUP);
   }

   /**
 
View Full Code Here

                           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

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.