public class CacheProxyFactoryBean extends AbstractSingletonProxyFactoryBean
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 FormConstructor and Description |
---|
CacheProxyFactoryBean() |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Object |
createMainInterceptor()
Create the "main" interceptor for this proxy factory bean.
|
void |
setCacheOperationSources(CacheOperationSource... cacheOperationSources)
Set the sources used to find cache operations.
|
void |
setPointcut(Pointcut pointcut)
Set a pointcut, i.e a bean that can cause conditional invocation
of the CacheInterceptor depending on method and attributes passed.
|
afterPropertiesSet, createTargetSource, getObject, getObjectType, isSingleton, postProcessProxyFactory, setAdvisorAdapterRegistry, setBeanClassLoader, setPostInterceptors, setPreInterceptors, setProxyClassLoader, setProxyInterfaces, setTarget
copyFrom, isExposeProxy, isFrozen, isOpaque, isOptimize, isProxyTargetClass, setExposeProxy, setFrozen, setOpaque, setOptimize, setProxyTargetClass, toString
public void setCacheOperationSources(CacheOperationSource... cacheOperationSources)
public void setPointcut(Pointcut pointcut)
protected java.lang.Object createMainInterceptor()
AbstractSingletonProxyFactoryBean
Pre-interceptors will be applied before, post-interceptors will be applied after this interceptor.
createMainInterceptor
in class AbstractSingletonProxyFactoryBean