Examples of stats()


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.persistence.dummy.DummyInMemoryStore.stats()

      for (CacheLoader cs: TestingUtil.cachestores(this.<String, Person>caches())) {
         assert cs.contains(persons[0].getName()) :
               "Cache misconfigured, maybe cache store not pointing to same place, maybe passivation on...etc";
         DummyInMemoryStore dimcs = (DummyInMemoryStore) cs;
         assert dimcs.stats().get("clear") == 0:
               "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("write") == 4:
               "Cache store should have been written to 4 times, but was written to " + dimcs.stats().get("write") + " times";
      }
View Full Code Here

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

         assert cs.contains(persons[0].getName()) :
               "Cache misconfigured, maybe cache store not pointing to same place, maybe passivation on...etc";
         DummyInMemoryStore dimcs = (DummyInMemoryStore) cs;
         assert dimcs.stats().get("clear") == 0:
               "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("write") == 4:
               "Cache store should have been written to 4 times, but was written to " + dimcs.stats().get("write") + " times";
      }

      // Before adding a node, verify that the query resolves properly
      executeSimpleQuery(this.<String, Person>caches().get(0));
View Full Code Here

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

               "Cache misconfigured, maybe cache store not pointing to same place, maybe passivation on...etc";
         DummyInMemoryStore dimcs = (DummyInMemoryStore) cs;
         assert dimcs.stats().get("clear") == 0:
               "Cache store should not be cleared, purgeOnStartup is false";
         assert dimcs.stats().get("write") == 4:
               "Cache store should have been written to 4 times, but was written to " + dimcs.stats().get("write") + " times";
      }

      // Before adding a node, verify that the query resolves properly
      executeSimpleQuery(this.<String, Person>caches().get(0));
View Full Code Here

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

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

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

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

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

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

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

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

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

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

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

Examples of org.infinispan.persistence.dummy.DummyInMemoryStore.stats()

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

      for (CacheLoader cs: cacheStores) {
         assert !cs.contains("key");
         DummyInMemoryStore dimcs = (DummyInMemoryStore) cs;
         assert dimcs.stats().get("delete") == 1 : "Entry should have been removed from the cache store just once, but was removed " + dimcs.stats().get("remove") + " times";
      }
   }

   public void testSkipSharedCacheStoreFlagUsage() throws PersistenceException {
      cache(0).getAdvancedCache().withFlags(Flag.SKIP_SHARED_CACHE_STORE).put("key", "value");
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.