Package org.infinispan.manager

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


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

  public void testLegacyJavaConfig() {
    GlobalConfiguration globalConfig = new GlobalConfigurationBuilder()
        .globalJmxStatistics().transport().defaultTransport().build();
View Full Code Here


      cacheManager.start();
      Cache<String, String> cache = cacheManager.getCache("testCache");
     
      cache.put("hello", "there legacy java");
    cache.stop();
    cacheManager.stop();
  }

  public void textXmlConfigLegacy() throws IOException {
    EmbeddedCacheManager cacheManager = new DefaultCacheManager(
        "config/leveldb-config-legacy.xml");
View Full Code Here

        "config/leveldb-config-legacy.xml");
    Cache<String, String> cache = cacheManager.getCache("testCache");
   
    cache.put("hello", "there legacy xml");
      cache.stop();
      cacheManager.stop();
     
      TestingUtil.recursiveFileRemove("/tmp/leveldb/legacy");
  }
 
  public void testXmlConfig52() throws IOException {
View Full Code Here

   
    Cache<String, String> cache = cacheManager.getCache("testCache");
   
    cache.put("hello", "there 52 xml");
      cache.stop();
    cacheManager.stop();
   
    TestingUtil.recursiveFileRemove("/tmp/leveldb/52");
  }
 
}
View Full Code Here

   public void testIndexingWithCustomLock() throws CyclicDependencyException {
      EmbeddedCacheManager cacheManager = createClusteredCacheManager();
      DependencyGraph<String> graph = TestingUtil.extractField(cacheManager, "cacheDependencyGraph");
      cacheManager.defineConfiguration("cache", getIndexedConfigWithCustomLock().build());
      startAndIndexData("cache", cacheManager);
      cacheManager.stop();

      List<String> cacheOrder = graph.topologicalSort();

      assertTrue(cacheOrder.indexOf("cache") < cacheOrder.indexOf("LuceneIndexesData"));
      assertTrue(cacheOrder.indexOf("cache") < cacheOrder.indexOf("LuceneIndexesMetadata"));
View Full Code Here

   @Test
   public void testIndexingOnCacheItself() throws CyclicDependencyException {
      EmbeddedCacheManager cacheManager = createClusteredCacheManager();
      cacheManager.defineConfiguration("single", getIndexedConfigWithCustomCaches("single", "single", "single").build());
      startAndIndexData("single", cacheManager);
      cacheManager.stop();

      assertEquals(cacheManager.getStatus(), ComponentStatus.TERMINATED);
   }

   @Test
View Full Code Here

      EmbeddedCacheManager cacheManager = createClusteredCacheManager();
      cacheManager.defineConfiguration("cacheA", getIndexedConfigWithCustomCaches("single", "single", "single").build());
      cacheManager.defineConfiguration("cacheB", getIndexedConfigWithCustomCaches("single", "single", "single").build());
      startAndIndexData("cacheA", cacheManager);
      startAndIndexData("cacheB", cacheManager);
      cacheManager.stop();

      assertEquals(cacheManager.getStatus(), ComponentStatus.TERMINATED);
   }

   @Test
View Full Code Here

      cacheManager.defineConfiguration("cacheB", getIndexedConfigWithCustomCaches("cacheA", "cacheA", "cacheA").build());
      cacheManager.defineConfiguration("cacheA", getIndexedConfig().build());
      startAndIndexData("cacheA", cacheManager);
      startAndIndexData("cacheB", cacheManager);
      startAndIndexData("cacheC", cacheManager);
      cacheManager.stop();

      assertEquals(cacheManager.getStatus(), ComponentStatus.TERMINATED);
   }

   private void startAndIndexData(String cacheName, CacheContainer cacheContainer) {
View Full Code Here

   @Test
   public void testIndexingOnDefaultCache() {
      EmbeddedCacheManager cacheManager = createClusteredCacheManager(getIndexedConfig());
      startAndIndexData(null, cacheManager);
      cacheManager.stop();

      assertEquals(cacheManager.getStatus(), ComponentStatus.TERMINATED);
   }

   @Test
View Full Code Here

   @Test
   public void testIndexingOnNamedCache() {
      EmbeddedCacheManager cacheManager = createClusteredCacheManager(getIndexedConfig());
      startAndIndexData("custom", cacheManager);
      cacheManager.stop();

      assertEquals(cacheManager.getStatus(), ComponentStatus.TERMINATED);
   }

   @Test
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.