Package org.infinispan.cdi.interceptor

Examples of org.infinispan.cdi.interceptor.DefaultCacheKey


      service.put(0l, "Manik");
      service.put(0l, "Kevin");
      service.put(1l, "Pete");

      assertEquals(cache.size(), 2);
      assertTrue(cache.containsKey(new DefaultCacheKey(new Object[]{0l})));
      assertTrue(cache.containsKey(new DefaultCacheKey(new Object[]{1l})));
   }
View Full Code Here


      service.putWithCacheName(0l, "Manik");
      service.putWithCacheName(0l, "Kevin");
      service.putWithCacheName(1l, "Pete");

      assertEquals(customCache.size(), 2);
      assertTrue(customCache.containsKey(new DefaultCacheKey(new Object[]{0l})));
      assertTrue(customCache.containsKey(new DefaultCacheKey(new Object[]{1l})));
   }
View Full Code Here

      service.putWithCacheKeyParam(0l, 1l, "Manik");
      service.putWithCacheKeyParam(0l, 1l, "Kevin");
      service.putWithCacheKeyParam(1l, 2l, "Pete");

      assertEquals(customCache.size(), 2);
      assertTrue(customCache.containsKey(new DefaultCacheKey(new Object[]{0l})));
      assertTrue(customCache.containsKey(new DefaultCacheKey(new Object[]{1l})));
   }
View Full Code Here

   public void testCacheRemoveEntry() {
      service.removeEntry("Kevin");
   }

   public void testCacheRemoveEntryWithCacheName() {
      final CacheKey cacheKey = new DefaultCacheKey(new Object[]{"Kevin"});

      customCache.put(cacheKey, "Hello Kevin");

      assertEquals(customCache.size(), 1);
      assertTrue(customCache.containsKey(cacheKey));
View Full Code Here

      assertEquals(customCache.size(), 0);
   }

   public void testCacheRemoveEntryWithCacheKeyParam() {
      final CacheKey cacheKey = new DefaultCacheKey(new Object[]{"Kevin"});

      customCache.put(cacheKey, "Hello Kevin");

      assertEquals(customCache.size(), 1);
      assertTrue(customCache.containsKey(cacheKey));
View Full Code Here

      assertEquals(customCache.size(), 0);
   }

   public void testCacheRemoveEntryAfterInvocationWithException() {
      final CacheKey cacheKey = new DefaultCacheKey(new Object[]{"Kevin"});

      customCache.put(cacheKey, "Hello Kevin");

      assertEquals(customCache.size(), 1);
      assertTrue(customCache.containsKey(cacheKey));
View Full Code Here

      assertEquals(customCache.size(), 0);
   }

   public void testCacheRemoveEntryBeforeInvocationWithException() {
      final CacheKey cacheKey = new DefaultCacheKey(new Object[]{"Kevin"});

      customCache.put(cacheKey, "Hello Kevin");

      assertEquals(customCache.size(), 1);
      assertTrue(customCache.containsKey(cacheKey));
View Full Code Here

TOP

Related Classes of org.infinispan.cdi.interceptor.DefaultCacheKey

Copyright © 2018 www.massapicom. 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.