Package org.infinispan.configuration.cache

Examples of org.infinispan.configuration.cache.ConfigurationBuilder.jmxStatistics()


   @Override
   protected EmbeddedCacheManager createCacheManager() throws Exception {
      cacheManager = TestCacheManagerFactory.createCacheManagerEnforceJmxDomain(JMX_DOMAIN);
      ConfigurationBuilder configuration = getDefaultStandaloneCacheConfig(false);
      configuration
         .jmxStatistics().enable()
         .persistence()
            .passivation(false)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class);
View Full Code Here


         gc.globalJmxStatistics().enable().mBeanServerLookup(mbsl);
         Properties p = new Properties();
         p.setProperty("key", "value");
         gc.globalJmxStatistics().addProperty("key", "value");
         ConfigurationBuilder cfg = new ConfigurationBuilder();
         cfg.jmxStatistics().enable();
         cc = TestCacheManagerFactory.createCacheManager(gc, cfg);
         cc.getCache();
         assert "value".equals(mbsl.localProps.get("key"));
      } finally {
         TestingUtil.killCacheManagers(cc);
View Full Code Here

      registerCacheManager(cacheManager1, cacheManager2);
      name1 = getCacheManagerObjectName(JMX_DOMAIN);
      name2 = getCacheManagerObjectName(JMX_DOMAIN2);
      server = PerThreadMBeanServerLookup.getThreadMBeanServer();
      ConfigurationBuilder config = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC);
      config.jmxStatistics().enable();
      defineConfigurationOnAllManagers("mycache", config);
      manager(0).getCache("mycache");
      manager(1).getCache("mycache");
   }
View Full Code Here

      registerCacheManager(cacheManager1);
      EmbeddedCacheManager cacheManager2 = TestCacheManagerFactory.createClusteredCacheManagerEnforceJmxDomain("SecondDefaultCacheManager", JMX_DOMAIN, true);
      registerCacheManager(cacheManager2);

      ConfigurationBuilder configuration = getDefaultClusteredCacheConfig(CacheMode.REPL_SYNC, true);
      configuration.jmxStatistics().enable();
      cacheManager1.defineConfiguration("test", configuration.build());
      cacheManager2.defineConfiguration("test", configuration.build());
      cache1 = cacheManager1.getCache("test");
      cache2 = cacheManager2.getCache("test");
      txInterceptor = getCacheObjectName(JMX_DOMAIN, "test(repl_sync)", "Transactions");
View Full Code Here

   @Override
   protected void createCacheManagers() throws Throwable {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(
            CacheMode.REPL_SYNC, false);
      builder.jmxStatistics().enable();

      EmbeddedCacheManager cm1 = TestCacheManagerFactory
            .createClusteredCacheManagerEnforceJmxDomain(JMX_1, builder);
      EmbeddedCacheManager cm2 = TestCacheManagerFactory
            .createClusteredCacheManagerEnforceJmxDomain(JMX_2, builder);
View Full Code Here

   }

   private static ConfigurationBuilder createConfiguration(String storeName, boolean shared, boolean transactional,
                                                           boolean passivation, int storePrefix) {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, transactional);
      builder.jmxStatistics().enable();
      builder.clustering()
            .hash().numOwners(2);
      builder.persistence()
            .passivation(passivation)
            .addStore(DummyInMemoryStoreConfigurationBuilder.class)
View Full Code Here

         // User-defined cache writer will be plugged once cache has started
         cb.persistence().addStore(JCacheWriterAdapterConfigurationBuilder.class);
      }

      if (c.isStatisticsEnabled())
         cb.jmxStatistics().enable();

      return cb.build();
   }

   public static <K, V> ConfigurationAdapter<K, V> create(Configuration<K, V> c) {
View Full Code Here

   protected void createCacheManagers() throws Throwable {
      indexDir = Files.createTempDirectory("test-").toFile();
      createIndex(indexDir, INDEX_NAME, TERMS_NUMBER, false);
      ConfigurationBuilder c = getDefaultClusteredCacheConfig(CacheMode.DIST_ASYNC, false);
      c.clustering().hash().numOwners(1);
      c.jmxStatistics().enable();
      c.persistence()
            .addStore(LuceneLoaderConfigurationBuilder.class)
            .preload(true)
            .location(indexDir.getAbsolutePath());
      createCluster(c, CLUSTER_SIZE);
View Full Code Here

      }
   }

   private ConfigurationBuilder buildConfiguration() {
      ConfigurationBuilder builder = getDefaultClusteredCacheConfig(CacheMode.DIST_SYNC, false);
      builder.jmxStatistics().enable();
      builder.clustering().hash().numOwners(2).stateTransfer().fetchInMemoryState(false);
      return hotRodCacheConfiguration(builder);
   }

   @AfterMethod
View Full Code Here

   long startTime;

   @BeforeMethod
   protected void setup() throws Exception {
      ConfigurationBuilder cfg = hotRodCacheConfiguration();
      cfg.jmxStatistics().enable();
      cacheContainer = TestCacheManagerFactory
            .createClusteredCacheManagerEnforceJmxDomain(getClass().getSimpleName(), cfg);

      hotrodServer = TestHelper.startHotRodServer((EmbeddedCacheManager) cacheContainer);
      startTime = System.currentTimeMillis();
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.