|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.googlecode.ehcache.annotations.DefaultCacheableInterceptor
public class DefaultCacheableInterceptor
Default interceptor that always returns cached values, throws cached exceptions and always caches values and exceptions.
| Field Summary | |
|---|---|
static DefaultCacheableInterceptor |
INSTANCE
|
| Constructor Summary | |
|---|---|
DefaultCacheableInterceptor()
|
|
| Method Summary | |
|---|---|
boolean |
postInvokeCacheable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
Called after a method invocation but before the returned value is cached Not used when Cacheable.selfPopulating() is set to true. |
boolean |
postInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
Called after a method invocation throws an exception AND an exception cache is configured for the interceptor but before the exception is cached |
boolean |
preInvokeCachable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
Called after a cache hit but before the method invocation. |
boolean |
preInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
Called after the cache lookup but before the method invocation if a cached exception was found |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final DefaultCacheableInterceptor INSTANCE
| Constructor Detail |
|---|
public DefaultCacheableInterceptor()
| Method Detail |
|---|
public boolean preInvokeCachable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
CacheableInterceptorCacheable.selfPopulating() is set to true.
preInvokeCachable in interface CacheableInterceptorcache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyvalue - The found cache value if any, may be null
public boolean postInvokeCacheable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
CacheableInterceptorCacheable.selfPopulating() is set to true.
postInvokeCacheable in interface CacheableInterceptorcache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyvalue - The value returned by the invocation
public boolean preInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
CacheableInterceptor
preInvokeCacheableException in interface CacheableInterceptorexceptionCache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyt - The exception thrown by the invocation
public boolean postInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
CacheableInterceptor
postInvokeCacheableException in interface CacheableInterceptorexceptionCache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyt - The exception thrown by the invocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||