Class CacheInterceptor
java.lang.Object
org.springframework.cache.interceptor.AbstractCacheInvoker
org.springframework.cache.interceptor.CacheAspectSupport
org.springframework.cache.interceptor.CacheInterceptor
- All Implemented Interfaces:
- Serializable,- Advice,- Interceptor,- MethodInterceptor,- Aware,- BeanFactoryAware,- InitializingBean,- SmartInitializingSingleton
AOP Alliance MethodInterceptor for declarative cache
 management using the common Spring caching infrastructure
 (
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.
- Since:
- 3.1
- Author:
- Costin Leau, Juergen Hoeller
- See Also:
- 
Nested Class SummaryNested classes/interfaces inherited from class org.springframework.cache.interceptor.CacheAspectSupportCacheAspectSupport.CacheOperationContext, CacheAspectSupport.CacheOperationMetadata
- 
Field SummaryFields inherited from class org.springframework.cache.interceptor.CacheAspectSupportloggerFields inherited from class org.springframework.cache.interceptor.AbstractCacheInvokererrorHandler
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptioninvoke(MethodInvocation invocation) Implement this method to perform extra treatments before and after the invocation.Methods inherited from class org.springframework.cache.interceptor.CacheAspectSupportafterPropertiesSet, afterSingletonsInstantiated, clearMetadataCache, configure, execute, getBean, getCacheOperationMetadata, getCacheOperationSource, getCacheResolver, getCaches, getKeyGenerator, getOperationContext, invokeOperation, methodIdentification, setBeanFactory, setCacheManager, setCacheOperationSource, setCacheOperationSources, setCacheResolver, setKeyGeneratorMethods inherited from class org.springframework.cache.interceptor.AbstractCacheInvokerdoClear, doEvict, doGet, doPut, getErrorHandler, setErrorHandler
- 
Constructor Details- 
CacheInterceptorpublic CacheInterceptor()
 
- 
- 
Method Details- 
invokeDescription copied from interface:MethodInterceptorImplement this method to perform extra treatments before and after the invocation. Polite implementations would certainly like to invokeJoinpoint.proceed().- Specified by:
- invokein interface- MethodInterceptor
- Parameters:
- invocation- the method invocation joinpoint
- Returns:
- the result of the call to Joinpoint.proceed(); might be intercepted by the interceptor
- Throws:
- Throwable- if the interceptors or the target object throws an exception
 
 
-