Package org.infinispan

Examples of org.infinispan.Cache.start()


         if (cache == null)
            return caches.get(cacheName).getCache();

         // start the cache-level components
         try {
            cache.start();
         } finally {
            // allow other threads to access the cache
            caches.get(cacheName).latch.countDown();
         }
View Full Code Here


      try {
         existingCache = caches.putIfAbsent(cacheName, cw);
         if (existingCache != null) {
            throw new IllegalStateException("attempt to initialize the cache twice");
         }
         cache.start();
      } finally {
         cw.latch.countDown();
      }
      return cache;
   }
View Full Code Here

      try {
         existingCache = caches.putIfAbsent(cacheName, cw);
         if (existingCache != null) {
            throw new IllegalStateException("attempt to initialize the cache twice");
         }
         cache.start();
      } finally {
         cw.latch.countDown();
      }
      return cache;
   }
View Full Code Here

      DataContainer c = preloadingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;
      preloadingCache.stop();
      assert c.size() == 0;

      preloadingCache.start();
      assert preloadingCache.getConfiguration().getCacheLoaderManagerConfig().isPreload();
      c = preloadingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;

      for (int i = 1; i < 5; i++) {
View Full Code Here

      DataContainer c = purgingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;
      purgingCache.stop();
      assert c.size() == 0;

      purgingCache.start();
      c = purgingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 0;

      assertNotInCacheAndStore(purgingCache, purgingStore, "k1", "k2", "k3", "k4");
   }
View Full Code Here

         if (cache == null)
            return caches.get(cacheName).getCache();

         // start the cache-level components
         try {
            cache.start();
         } finally {
            // allow other threads to access the cache
            caches.get(cacheName).latch.countDown();
         }
View Full Code Here

      try {
         existingCache = caches.putIfAbsent(cacheName, cw);
         if (existingCache != null) {
            throw new IllegalStateException("attempt to initialize the cache twice");
         }
         cache.start();
      } finally {
         cw.latch.countDown();
      }
      return cache;
   }
View Full Code Here

      DataContainer c = preloadingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;
      preloadingCache.stop();
      assert c.size() == 0;

      preloadingCache.start();
      // The old store's marshaller is not working any more
      preloadingStore = TestingUtil.extractComponent(preloadingCache, CacheLoaderManager.class).getCacheStore();
      assert preloadingCache.getConfiguration().getCacheLoaderManagerConfig().isPreload();
      c = preloadingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;
View Full Code Here

      DataContainer c = purgingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 4;
      purgingCache.stop();
      assert c.size() == 0;

      purgingCache.start();
      c = purgingCache.getAdvancedCache().getDataContainer();
      assert c.size() == 0;

      assertNotInCacheAndStore(purgingCache, purgingStore, "k1", "k2", "k3", "k4");
   }
View Full Code Here

      try {
         existingCache = caches.putIfAbsent(cacheName, cw);
         if (existingCache != null) {
            throw new IllegalStateException("attempt to initialize the cache twice");
         }
         cache.start();
      } finally {
         cw.latch.countDown();
      }
      return cache;
   }
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.