|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface CacheableInterceptor
Used by Cacheable to allow logic to be injected into the caching API.
Normal execution workflow looks like:
preInvokeCachable(Ehcache, MethodInvocation, Serializable, Object) is calledpostInvokeCacheable(Ehcache, MethodInvocation, Serializable, Object)Cacheable.exceptionCacheName() is defined):
preInvokeCacheableException(Ehcache, MethodInvocation, Serializable, Throwable) is called
preInvokeCachable(Ehcache, MethodInvocation, Serializable, Object) is called
postInvokeCacheableException(Ehcache, MethodInvocation, Serializable, Throwable)postInvokeCacheable(Ehcache, MethodInvocation, Serializable, Object)
| 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 |
| Method Detail |
|---|
boolean preInvokeCachable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
Cacheable.selfPopulating() is set to true.
cache - 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
boolean postInvokeCacheable(net.sf.ehcache.Ehcache cache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Object value)
Cacheable.selfPopulating() is set to true.
cache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyvalue - The value returned by the invocation
boolean preInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
exceptionCache - The cache used for this invocationmethodInvocation - The method invocation that has been interceptedkey - The generated cache keyt - The exception thrown by the invocation
boolean postInvokeCacheableException(net.sf.ehcache.Ehcache exceptionCache,
org.aopalliance.intercept.MethodInvocation methodInvocation,
java.io.Serializable key,
java.lang.Throwable t)
exceptionCache - 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 | |||||||||