Examples of defineConfiguration()


Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

   }

   private void addNewCacheManagerAndWaitForRehash() {
      EmbeddedCacheManager cacheManager = addClusterEnabledCacheManager(getDefaultClusteredCacheConfig(
            CacheMode.DIST_SYNC, false));
      cacheManager.defineConfiguration(testCacheName, buildCfg(true));
      log.debug("\n\nstarted CacheManager #" + (getCacheManagers().size() - 1));
      waitForClusterToForm(testCacheName);
   }

   private Configuration buildCfg(boolean clustered) {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

   private void putTestDataInCacheStore() {
      log.debug("Using cache store dir " + fileCacheStoreTmpDir);
      EmbeddedCacheManager cmForCacheStoreInit = TestCacheManagerFactory.createCacheManager(TestCacheManagerFactory
            .getDefaultConfiguration(true));
      try {
         cmForCacheStoreInit.defineConfiguration(testCacheName, buildCfg(false));

         Cache<String, String> cache = cmForCacheStoreInit.getCache(testCacheName);
         cache.put("key1", "one");
         cache.put("key2", "two");
         cache.put("key3", "three");
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      ConfigurationBuilder cb = getDefaultStandaloneCacheConfig(true);
      cb.locking().isolationLevel(getIsolationLevel());
      addEviction(cb);
      amend(cb);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
      cm.defineConfiguration("test", cb.build());
      cache = cm.getCache("test");
      return cm;
   }

   protected void amend(ConfigurationBuilder cb) {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      registerCacheManager(cacheManager2);

      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC, true);
      configuration.setExposeJmxStatistics(true);
      cacheManager1.defineConfiguration("test", configuration);
      cacheManager2.defineConfiguration("test", configuration.clone());
      cache1 = cacheManager1.getCache("test");
      cache2 = cacheManager2.getCache("test");
      txInterceptor = getCacheObjectName(JMX_DOMAIN, "test(repl_sync)", "Transactions");
      txInterceptor2 = getCacheObjectName(JMX_DOMAIN, "test(repl_sync)", "Transactions", "SecondDefaultCacheManager");
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

   protected EmbeddedCacheManager createCacheManager() throws Exception {
      // start a single cache instance
      ConfigurationBuilder dscb = getDefaultStandaloneCacheConfig(false);
      dscb.locking().supportsConcurrentUpdates(false);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
      cm.defineConfiguration("test", dscb.build());
      cache = cm.getCache("test");
      return cm;
   }

   public void testNonLockingInterceptor() {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      globalConfigurationBuilder.transport().machineId("m" + (machineId > 0 ? machineId : counter))
            .rackId("r" + (rackId > 0 ? rackId : counter)).siteId("s" + (siteId > 0 ? siteId : counter));

      EmbeddedCacheManager cm1 = TestCacheManagerFactory.createClusteredCacheManager(globalConfigurationBuilder,
                                                                                     builder);
      cm1.defineConfiguration(CACHE_NAME, builder.build());

      return cm1;
   }

   public CacheMode getCacheMode() {
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      EmbeddedCacheManager cm = addClusterEnabledCacheManager();
      GlobalConfiguration gc = cm.getGlobalConfiguration();
      Properties p = new Properties();
      p.setProperty("maxThreads", "25");
      gc.setAsyncTransportExecutorProperties(p);
      cm.defineConfiguration(cacheName, config.clone());
      return cm;
   }

   protected void writeInitialData(final Cache<Object, Object> c) {
      c.put(A_B_NAME, JOE);
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
      cacheContainers.add(cm);
      cm.start();
      Configuration configuration = config();
      configuration.setCacheMode(Configuration.CacheMode.LOCAL);
      cm.defineConfiguration("first", configuration);
      Cache first = cm.getCache("first");

      ComponentsJmxRegistration regComponents = buildRegistrator(first);
      regComponents.registerMBeans();
      String name = regComponents.getObjectName("Statistics").toString();
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      cacheContainers.add(cm);
      cm.start();
      Configuration configurationOverride = config();
      configurationOverride.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      cm.defineConfiguration("first", configurationOverride);
      Cache first = cm.getCache("first");

      ComponentsJmxRegistration regComponents = buildRegistrator(first);
      regComponents.registerMBeans();
      String name = regComponents.getObjectName("Statistics").toString();
View Full Code Here

Examples of org.infinispan.manager.EmbeddedCacheManager.defineConfiguration()

      cm.start();
      Configuration replicated = config();
      Configuration local = config();
      replicated.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      local.setCacheMode(Configuration.CacheMode.LOCAL);
      cm.defineConfiguration("replicated", replicated);
      cm.defineConfiguration("local", local);
      Cache replicatedCache = cm.getCache("replicated");
      Cache localCache = cm.getCache("local");

      ComponentsJmxRegistration replicatedRegComponents = buildRegistrator(replicatedCache);
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.