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;
      } finally {
View Full Code Here

         manager.defineConfiguration(regionName, templateCacheName, regionCacheCfg);
         definedConfigurations.add(regionName);
      }
      Cache cache = manager.getCache(regionName);
      if (!cache.getStatus().allowInvocations()) {
         cache.start();
      }
      return createCacheWrapper(cache.getAdvancedCache());
   }

   protected ClassLoaderAwareCache createCacheWrapper(AdvancedCache 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

      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

         Cache first = localCacheManager.getCache("first");
         Cache second = localCacheManager.getCache("second");

         first.start();
         second.start();

         first.put("key", "val");
         assert first.get("key").equals("val");
         assert second.get("key") == null;
View Full Code Here

      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();

      container = TestCacheManagerFactory.createClusteredCacheManager(c);
      container.start();
      registerCacheManager(container);
      container.startCaches(CacheContainer.DEFAULT_CACHE_NAME, "TestCache");
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.