Package org.infinispan.jcache.annotation
Class AbstractCacheResultInterceptor
- java.lang.Object
-
- org.infinispan.jcache.annotation.AbstractCacheResultInterceptor
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CacheResultInterceptor,InjectedCacheResultInterceptor
public abstract class AbstractCacheResultInterceptor extends Object implements Serializable
CacheResultinterceptor implementation. This interceptor uses the following algorithm describes in JSR-107.When a method annotated with
CacheResultis invoked the following must occur.- Generate a key based on InvocationContext using the specified CacheKeyGenerator.
- Use this key to look up the entry in the cache.
- If an entry is found return it as the result and do not call the annotated method.
- If no entry is found invoke the method.
- Use the result to populate the cache with this key/result pair.
- Author:
- Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI, Galder ZamarreƱo
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractCacheResultInterceptor(javax.cache.annotation.CacheResolver defaultCacheResolver, CacheKeyInvocationContextFactory contextFactory)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ObjectcacheResult(javax.interceptor.InvocationContext invocationContext)protected abstract org.infinispan.jcache.logging.LoggetLog()
-
-
-
Constructor Detail
-
AbstractCacheResultInterceptor
public AbstractCacheResultInterceptor(javax.cache.annotation.CacheResolver defaultCacheResolver, CacheKeyInvocationContextFactory contextFactory)
-
-