Package org.infinispan

Examples of org.infinispan.Cache.containsKey()


      Cache cache1 = cache(0, "replSync");
      cache(1, "replSync");
      Pojo pojo = new Pojo();
      cache1.put(pojo, pojo);
      cache1.evict(pojo);
      assertTrue(!cache1.containsKey(pojo));
   }

   public void testModificationsOnSameCustomKey() {
      Cache cache1 = cache(0, "replSync");
      Cache cache2 = cache(1, "replSync");
View Full Code Here


      Cache cache1 = cache(0, "replSync");
      cache(1, "replSync");
      Pojo pojo = new Pojo();
      cache1.put(pojo, pojo);
      cache1.evict(pojo);
      assert !cache1.containsKey(pojo);
   }

   public void testModificationsOnSameCustomKey() {
      Cache cache1 = cache(0, "replSync");
      Cache cache2 = cache(1, "replSync");
View Full Code Here

      removeCompletedLatch.await(1000, TimeUnit.MILLISECONDS);
      // Once remove executed, now let the interval flush continue
      intervalFlushLatch.countDown();
      // Wait for periodic flush to send modifications over the wire
      TestingUtil.sleepThread(500);
      assert !cache2.containsKey(k);
   }

   public static class MockReplQueue extends ReplicationQueueImpl {
      static final Log log = LogFactory.getLog(MockReplQueue.class);
      static CountDownLatch intervalFlushLatch;
View Full Code Here

      final String cacheName = getClass().getSimpleName();
      if (sync()) {
         Cache c1 = cache(0, cacheName);
         Cache c2 = cache(1, cacheName);
         assert Util.safeEquals(c1.get(k), value);
         assert !c2.containsKey(k);
      } else {
         eventually(new Condition() {
            @Override
            public boolean isSatisfied() throws Exception {
               Object v0 = cache(0, cacheName).get(k);
View Full Code Here

      EmbeddedCacheManager cm2 = addClusterEnabledCacheManager();
      cm2.defineConfiguration("onlyFetchPersistent", cfg2.build());

      Cache cache2 = cache(1, "onlyFetchPersistent");
      assert !cache2.getCacheConfiguration().clustering().stateTransfer().fetchInMemoryState();
      assert cache2.containsKey(theKey);
      assert cache2.get(theKey).equals(theValue);
   }

}
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.