Examples of stats()


Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");

      for (Cache<Object, Object> c: caches())
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");

      for (Cache<Object, Object> c: caches())
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

         assert c.get("key") == null;

      for (CacheStore cs: cachestores) {
         assert !cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("remove") == 1 : "Entry should have been removed from the cache store just once, but was removed " + dimcs.stats().get("remove") + " times";
      }
   }

   public void testSkipSharedCacheStoreFlagUsage() throws CacheLoaderException {
      cache(0).getAdvancedCache().withFlags(Flag.SKIP_SHARED_CACHE_STORE).put("key", "value");
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

         assert c.get("key") == null;

      for (CacheStore cs: cachestores) {
         assert !cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("remove") == 1 : "Entry should have been removed from the cache store just once, but was removed " + dimcs.stats().get("remove") + " times";
      }
   }

   public void testSkipSharedCacheStoreFlagUsage() throws CacheLoaderException {
      cache(0).getAdvancedCache().withFlags(Flag.SKIP_SHARED_CACHE_STORE).put("key", "value");
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs : cachestores) {
         assert !cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("store") == 0 : "Cache store should NOT contain any entry. Put was with SKIP_SHARED_CACHE_STORE flag.";
      }
   }

}
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      return clm.getCacheStore();
   }

   private int getCacheStoreStats(Cache<?, ?> cache, String cacheStoreMethod) {
      DummyInMemoryCacheStore cs = (DummyInMemoryCacheStore) getCacheStore(cache);
      return cs.stats().get(cacheStoreMethod);
   }

   public void testRehashes() throws CacheLoaderException {
      MagicKey k = new MagicKey("k", c1);
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");

      for (Cache<Object, Object> c: caches())
View Full Code Here

Examples of org.infinispan.loaders.dummy.DummyInMemoryCacheStore.stats()

      List<CacheStore> cachestores = TestingUtil.cachestores(caches());
      for (CacheStore cs: cachestores) {
         assert cs.containsKey("key");
         DummyInMemoryCacheStore dimcs = (DummyInMemoryCacheStore) cs;
         assert dimcs.stats().get("clear") == 0: "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("store") == 1: "Cache store should have been written to just once, but was written to " + dimcs.stats().get("store") + " times";
      }

      cache(0).remove("key");

      for (Cache<Object, Object> c: caches())
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.