public class JCacheInterceptor extends JCacheAspectSupport implements MethodInterceptor, Serializable
Derives from the JCacheAspectSupport class which
contains the integration with Spring's underlying caching API.
JCacheInterceptor simply calls the relevant superclass method.
JCacheInterceptors are thread-safe.
CacheInterceptor,
Serialized FormloggererrorHandler| Constructor and Description |
|---|
JCacheInterceptor()
Construct a new
JCacheInterceptor with the default error handler. |
JCacheInterceptor(Supplier<CacheErrorHandler> errorHandler)
Construct a new
JCacheInterceptor with the given error handler. |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(MethodInvocation invocation)
Implement this method to perform extra treatments before and
after the invocation.
|
afterPropertiesSet, execute, getCacheOperationSource, invokeOperation, setCacheOperationSourcedoClear, doEvict, doGet, doPut, getErrorHandler, setErrorHandlerpublic JCacheInterceptor()
JCacheInterceptor with the default error handler.public JCacheInterceptor(@Nullable Supplier<CacheErrorHandler> errorHandler)
JCacheInterceptor with the given error handler.errorHandler - a supplier for the error handler to use,
applying the default error handler if the supplier is not resolvable@Nullable public Object invoke(MethodInvocation invocation) throws Throwable
MethodInterceptorJoinpoint.proceed().invoke in interface MethodInterceptorinvocation - the method invocation joinpointJoinpoint.proceed();
might be intercepted by the interceptorThrowable - if the interceptors or the target object
throws an exception