Package org.infinispan.cdi.test.interceptor.service

Examples of org.infinispan.cdi.test.interceptor.service.CustomCacheKey


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

      assertEquals(customCache.size(), 2);
      assertTrue(customCache.containsKey(new CustomCacheKey(method, 0l)));
      assertTrue(customCache.containsKey(new CustomCacheKey(method, 0l)));
   }
View Full Code Here


      }
   }

   public void testCacheRemoveEntryWithCacheKeyGenerator() throws NoSuchMethodException {
      final Method method = CacheRemoveEntryService.class.getMethod("removeEntryWithCacheKeyGenerator", String.class);
      final CacheKey cacheKey = new CustomCacheKey(method, "Kevin");

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

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

      String message = service.cacheResultWithCacheKeyGenerator("Kevin");

      assertEquals("Hello Kevin", message);
      assertEquals(customCache.size(), 1);
      assertTrue(customCache.containsKey(new CustomCacheKey(method, "Kevin")));

      message = service.cacheResultWithCacheKeyGenerator("Kevin");

      assertEquals("Hello Kevin", message);
      assertEquals(customCache.size(), 1);
View Full Code Here

TOP

Related Classes of org.infinispan.cdi.test.interceptor.service.CustomCacheKey

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.