Examples of defineCache()


Examples of org.infinispan.manager.CacheManager.defineCache()

      Configuration config = new Configuration();
      config.setExposeJmxStatistics(true);
      config.setEvictionMaxEntries(123);
      config.setExpirationMaxIdle(180000);
     
      manager.defineCache(MY_CUSTOM_CACHE, config);
      Cache<String,String> cache = manager.getCache(MY_CUSTOM_CACHE);

      cache.put("myKey", "myValue");

      int i = 0;
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

      config.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
   }

   protected CacheManager createCacheManager() {
      CacheManager cm = addClusterEnabledCacheManager();
      cm.defineCache(cacheName, config.clone());
      return cm;
   }

   public static class DelayTransfer implements Serializable {
      private transient int count;
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

      assert clMngrConfig2.getCacheLoaderConfigs().size() == 2;
      config2.setCacheLoaderManagerConfig(clMngrConfig2);


      cacheManager1.defineCache("clusteredCl", config1);
      cacheManager2.defineCache("clusteredCl", config2);
      cache1 = cache(0, "clusteredCl");
      cache2 = cache(1, "clusteredCl");
      CacheLoaderManager manager2 = cache2.getAdvancedCache().getComponentRegistry().getComponent(CacheLoaderManager.class);
      ChainingCacheStore chainingCacheStore = (ChainingCacheStore) manager2.getCacheStore();
      cs2 = chainingCacheStore.getStores().keySet().iterator().next();
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

   protected <K, V> List<Cache<K, V>> createClusteredCaches(int numMembersInCluster, String cacheName, Configuration c) {
      List<Cache<K, V>> caches = new ArrayList<Cache<K, V>>(numMembersInCluster);
      for (int i = 0; i < numMembersInCluster; i++) {
         CacheManager cm = addClusterEnabledCacheManager();
         cm.defineCache(cacheName, c);
         Cache<K, V> cache = cm.getCache(cacheName);
         caches.add(cache);
      }
      TestingUtil.blockUntilViewsReceived(10000, caches);
      return caches;
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

      // start a single cache instance
      Configuration c = new Configuration();
      c.setIsolationLevel(getIsolationLevel());
      c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      CacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
      cm.defineCache("test", c);
      cache = cm.getCache("test");
      return cm;
   }

   protected abstract IsolationLevel getIsolationLevel();
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

   protected CacheManager createCacheManager() throws Exception {
      Configuration c = new Configuration();
      c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      CacheManager cm = TestCacheManagerFactory.createCacheManager(c);
      cm.defineCache("c1", c);
      cm.defineCache("c2", c);
      return cm;
   }

   public void testCommitSpanningCaches() throws Exception {
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

   protected CacheManager createCacheManager() throws Exception {
      Configuration c = new Configuration();
      c.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      CacheManager cm = TestCacheManagerFactory.createCacheManager(c);
      cm.defineCache("c1", c);
      cm.defineCache("c2", c);
      return cm;
   }

   public void testCommitSpanningCaches() throws Exception {
      Cache c1 = cacheManager.getCache("c1");
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

      Configuration configuration = getDefaultClusteredConfig(Configuration.CacheMode.REPL_SYNC);
      configuration.setExposeJmxStatistics(true);
      configuration.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      cacheManager1.defineCache("test", configuration);
      cacheManager2.defineCache("test", configuration.clone());
      cache1 = cacheManager1.getCache("test");
      cache2 = cacheManager2.getCache("test");
      txInterceptor = new ObjectName("TxInterceptorMBeanTest:cache-name=test(repl_sync),jmx-resource=Transactions");

      threadMBeanServer = PerThreadMBeanServerLookup.getThreadMBeanServer();
View Full Code Here

Examples of org.infinispan.manager.CacheManager.defineCache()

      CacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
      cacheManagers.add(cm);
      cm.start();
      Configuration configuration = config();
      configuration.setCacheMode(Configuration.CacheMode.LOCAL);
      cm.defineCache("first", configuration);
      Cache first = cm.getCache("first");

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

Examples of org.infinispan.manager.CacheManager.defineCache()

      CacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      cacheManagers.add(cm);
      cm.start();
      Configuration configurationOverride = config();
      configurationOverride.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      cm.defineCache("first", configurationOverride);
      Cache first = cm.getCache("first");

      ComponentsJmxRegistration regComponents = buildRegistrator(first);
      regComponents.registerMBeans();
      String name = regComponents.getObjectName("Statistics");
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.