Package org.infinispan.manager

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


   public void testStopStartCM() throws Exception {
      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
      cacheContainers.add(cm);
      cm.stop();
      cm.start();
   }

   public void testRegisterLocalCache() throws Exception {
      EmbeddedCacheManager cm = TestCacheManagerFactory.createLocalCacheManager(false);
      cacheContainers.add(cm);
View Full Code Here


   }

   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

      c.setSyncRollbackPhase(true);
      c.setUseLockStriping(false);
      c.fluent().transaction().transactionMode(TransactionMode.TRANSACTIONAL);

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

      Cache cache1 = container.getCache("TestCache");
      assert cache1.getConfiguration().getCacheMode().equals(Configuration.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.getConfiguration().getCacheMode().equals(Configuration.CacheMode.REPL_SYNC);
   }
View Full Code Here

      for (Configuration config: configuration.getConfigurations())
      {
         manager.defineConfiguration(config.getName(), config);
      }
     
      manager.start();
     
      return (aliases != null) && !aliases.isEmpty() ? new AliasAwareCacheContainer(manager, aliases) : manager;
   }
  
   /**
 
View Full Code Here

         EmbeddedCacheManager manager = new DefaultCacheManager(configLoc, false);
         String globalStats = ConfigurationHelper.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

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        globalConfig);

    cacheManager.defineConfiguration("testCache", cacheConfig);

    cacheManager.start();
    Cache<String, String> cache = cacheManager.getCache("testCache");
   
    cache.put("hello", "there");
    cache.stop();
    cacheManager.stop();
View Full Code Here

    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        globalConfig);

    cacheManager.defineConfiguration("testCache", cacheConfig);

      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");
     
      cache.put("hello", "there legacy java");
    cache.stop();
    cacheManager.stop();
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.