Package org.infinispan.loaders

Examples of org.infinispan.loaders.CacheStore.clear()


      CacheStore store = cacheLoaderManager.getCacheStore();
      cacheManager.getCache(cacheName).stop();

      // After stopping the cache, clear it
      if (store != null)
         store.clear();

      registry.removeCache(cacheName);
      return null;
   }
View Full Code Here


      CacheJmxRegistration jmx = cache.getAdvancedCache().getComponentRegistry().getComponent(CacheJmxRegistration.class);
      cache.stop();

      // After stopping the cache, clear it
      if (store != null)
         store.clear();

      // And see if we need to remove it from JMX
      if (jmx != null) {
         jmx.unregisterCacheMBean();
      }
View Full Code Here

   @Test
   public void testDoWorkOnClear() throws Exception {
      CacheStore cs = createMock(CacheStore.class);
      Clear clear = createMock(Clear.class);
      expect(clear.getType()).andReturn(Modification.Type.CLEAR);
      cs.clear();
      replay(cs);
      replay(clear);

      ModificationsTransactionWorker worker =
            new ModificationsTransactionWorker(cs,
View Full Code Here

      CacheStore store = cacheLoaderManager.getCacheStore();
      cacheManager.getCache(cacheName).stop();

      // After stopping the cache, clear it
      if (store != null)
         store.clear();

      registry.removeCache(cacheName);
      return null;
   }
View Full Code Here

   @Test
   public void testDoWorkOnClear() throws Exception {
      CacheStore cs = mock(CacheStore.class);
      Clear clear = mock(Clear.class);
      when(clear.getType()).thenReturn(Modification.Type.CLEAR);
      cs.clear();

      ModificationsTransactionWorker worker =
            new ModificationsTransactionWorker(cs,
                                               Collections.singletonList(clear));
      worker.doWork();
View Full Code Here

      CacheJmxRegistration jmx = cache.getAdvancedCache().getComponentRegistry().getComponent(CacheJmxRegistration.class);
      cache.stop();

      // After stopping the cache, clear it
      if (store != null)
         store.clear();

      // And see if we need to remove it from JMX
      if (jmx != null) {
         jmx.unregisterCacheMBean();
      }
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.