public class CacheInterceptor extends CacheAspectSupport implements MethodInterceptor, java.io.Serializable
Cache
).
Derives from the CacheAspectSupport
class which
contains the integration with Spring's underlying caching API.
CacheInterceptor simply calls the relevant superclass methods
in the correct order.
CacheInterceptors are thread-safe.
CacheAspectSupport.CacheOperationContext, CacheAspectSupport.CacheOperationMetadata
logger
Constructor and Description |
---|
CacheInterceptor() |
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
invoke(MethodInvocation invocation)
Implement this method to perform extra treatments before and
after the invocation.
|
afterPropertiesSet, afterSingletonsInstantiated, clearMetadataCache, execute, getBean, getCacheOperationMetadata, getCacheOperationSource, getCacheResolver, getCaches, getKeyGenerator, getOperationContext, invokeOperation, methodIdentification, setApplicationContext, setBeanFactory, setCacheManager, setCacheOperationSources, setCacheResolver, setKeyGenerator
doClear, doEvict, doGet, doPut, getErrorHandler, setErrorHandler
public java.lang.Object invoke(MethodInvocation invocation) throws java.lang.Throwable
MethodInterceptor
Joinpoint.proceed()
.invoke
in interface MethodInterceptor
invocation
- the method invocation joinpointJoinpoint.proceed()
;
might be intercepted by the interceptorjava.lang.Throwable
- if the interceptors or the target object
throws an exception