Package org.infinispan.manager

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


   }

   public void testRegisterLocalCache() throws Exception {
      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");
View Full Code Here


   public void testRegisterReplicatedCache() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.setAllowDuplicateDomains(true);
      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");
View Full Code Here

   public void testLocalAndReplicatedCache() throws Exception {
      GlobalConfiguration globalConfiguration = GlobalConfiguration.getClusteredDefault();
      globalConfiguration.setAllowDuplicateDomains(true);
      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(globalConfiguration);
      cacheContainers.add(cm);
      cm.start();
      Configuration replicated = config();
      Configuration local = config();
      replicated.setCacheMode(Configuration.CacheMode.REPL_SYNC);
      local.setCacheMode(Configuration.CacheMode.LOCAL);
      cm.defineConfiguration("replicated", replicated);
View Full Code Here

         EmbeddedCacheManager manager = new DefaultCacheManager(configLoc, false);
         String globalStats = PropertiesHelper.extractPropertyValue(INFINISPAN_GLOBAL_STATISTICS_PROP, properties);
         if (globalStats != null) {
            manager.getGlobalConfiguration().setExposeGlobalJmxStatistics(Boolean.parseBoolean(globalStats));
         }
         manager.start();
         return manager;
      } catch (IOException e) {
         throw new CacheException("Unable to create default cache manager", e);
      }
   }
View Full Code Here

         GlobalConfiguration gc = GlobalConfiguration.getClusteredDefault();
         Properties p = new Properties();
         p.setProperty("channelLookup", DummyLookup.class.getName());
         gc.setTransportProperties(p);
         cm = TestCacheManagerFactory.createCacheManager(gc);
         cm.start();
         cm.getCache();

         GlobalComponentRegistry gcr = TestingUtil.extractGlobalComponentRegistry(cm);
         Transport t = gcr.getComponent(Transport.class);
         assert t != null;
View Full Code Here

            .syncCommitPhase(true).syncRollbackPhase(true)
            .invocationBatching().enable()
            .locking().lockAcquisitionTimeout(60000).useLockStriping(false);

      EmbeddedCacheManager container = TestCacheManagerFactory.createClusteredCacheManager(c);
      container.start();
      registerCacheManager(container);
      container.startCaches(CacheContainer.DEFAULT_CACHE_NAME, "TestCache");
      Cache cache1 = container.getCache("TestCache");
      assert cache1.getCacheConfiguration().clustering().cacheMode().equals(CacheMode.REPL_SYNC);
      cache1.start();
View Full Code Here

      Cache cache1 = container.getCache("TestCache");
      assert cache1.getCacheConfiguration().clustering().cacheMode().equals(CacheMode.REPL_SYNC);
      cache1.start();

      container = TestCacheManagerFactory.createClusteredCacheManager(c);
      container.start();
      registerCacheManager(container);
      container.startCaches(CacheContainer.DEFAULT_CACHE_NAME, "TestCache");
      Cache cache2 = container.getCache("TestCache");
      assert cache2.getCacheConfiguration().clustering().cacheMode().equals(CacheMode.REPL_SYNC);
   }
View Full Code Here

   }
  
   private void start(CacheContainerRegistryEntry entry)
   {
      EmbeddedCacheManager container = entry.getContainer();
      container.start();
      container.addListener(this.factory);
     
      String jndiName = entry.getJndiName();
     
      if (jndiName != null)
View Full Code Here

      config
         .eviction().maxEntries(capacity).strategy(EvictionStrategy.LRU)
         .expiration().wakeUpInterval(5000L).maxIdle(120000L);

      EmbeddedCacheManager cm = TestCacheManagerFactory.createCacheManager(config);
      cm.start();
      return cm.getCache();
   }

   @DataProvider(name = "readWriteRemove")
   public Object[][] independentReadWriteRemoveParams() {
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.