Examples of defineCache()


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

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

      ComponentsJmxRegistration replicatedRegComponents = buildRegistrator(replicatedCache);
View Full Code Here

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

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

      ComponentsJmxRegistration replicatedRegComponents = buildRegistrator(replicatedCache);
      ComponentsJmxRegistration localRegComponents = buildRegistrator(localCache);
View Full Code Here

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

   protected CacheManager createCacheManager() {
      Configuration cfg = new Configuration();
      cfg.setTransactionManagerLookupClass(DummyTransactionManagerLookup.class.getName());
      CacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
      cm.defineCache("test", cfg);
      c = cm.getCache("test");
      return cm;
   }

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

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

      CacheManager cm = TestCacheManagerFactory.createLocalCacheManager();
      Configuration c = new Configuration();
      c.setFetchInMemoryState(false);
      c.setInvocationBatchingEnabled(true);
      c.setLockAcquisitionTimeout(1000);
      cm.defineCache("test", c);
      cache = cm.getCache("test");
      tm = TestingUtil.extractComponent(cache, TransactionManager.class);
      treeCache = new TreeCacheImpl(cache);
      dc = TestingUtil.extractComponent(cache, DataContainer.class);
      return cm;
View Full Code Here

Examples of org.infinispan.manager.DefaultCacheManager.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
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.