public class CacheProxyFactoryBean
extends org.springframework.aop.framework.AbstractSingletonProxyFactoryBean
implements org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.SmartInitializingSingleton
ProxyFactoryBean
with a separate CacheInterceptor definition.
This class is designed to facilitate declarative cache demarcation: namely, wrapping
a singleton target object with a caching proxy, proxying all the interfaces that the
target implements. Exists primarily for third-party framework integration.
Users should favor the cache: XML namespace
@Cacheable annotation.
See the declarative annotation-based caching section
of the Spring reference documentation for more information.
ProxyFactoryBean,
CacheInterceptor,
Serialized Form| Constructor and Description |
|---|
CacheProxyFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterSingletonsInstantiated() |
protected java.lang.Object |
createMainInterceptor() |
void |
setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory) |
void |
setCacheOperationSources(CacheOperationSource... cacheOperationSources)
Set one or more sources to find cache operations.
|
void |
setPointcut(org.springframework.aop.Pointcut pointcut)
Set a pointcut, i.e.
|
afterPropertiesSet, createTargetSource, getObject, getObjectType, isSingleton, postProcessProxyFactory, setAdvisorAdapterRegistry, setBeanClassLoader, setPostInterceptors, setPreInterceptors, setProxyClassLoader, setProxyInterfaces, setTargetpublic void setCacheOperationSources(CacheOperationSource... cacheOperationSources)
public void setPointcut(org.springframework.aop.Pointcut pointcut)
CacheInterceptor depending on the method and attributes passed.
Note: Additional interceptors are always invoked.
AbstractSingletonProxyFactoryBean.setPreInterceptors(java.lang.Object[]),
AbstractSingletonProxyFactoryBean.setPostInterceptors(java.lang.Object[])public void setBeanFactory(org.springframework.beans.factory.BeanFactory beanFactory)
setBeanFactory in interface org.springframework.beans.factory.BeanFactoryAwarepublic void afterSingletonsInstantiated()
afterSingletonsInstantiated in interface org.springframework.beans.factory.SmartInitializingSingletonprotected java.lang.Object createMainInterceptor()
createMainInterceptor in class org.springframework.aop.framework.AbstractSingletonProxyFactoryBean