类 AbstractFallbackJCacheOperationSource
- java.lang.Object
- org.springframework.cache.jcache.interceptor.AbstractFallbackJCacheOperationSource
- 所有已实现的接口:
JCacheOperationSource
public abstract class AbstractFallbackJCacheOperationSource extends Object implements JCacheOperationSource
Abstract implementation ofJCacheOperationSource
that caches attributes for methods and implements a fallback policy: 1. specific target method; 2. declaring method.This implementation caches attributes by method after they are first used.
- 从以下版本开始:
- 4.1
- 作者:
- Stephane Nicoll, Juergen Hoeller
- 另请参阅:
AbstractFallbackCacheOperationSource
构造器概要
构造器 构造器 说明 AbstractFallbackJCacheOperationSource()
方法概要
所有方法 实例方法 抽象方法 具体方法 修饰符和类型 方法 说明 protected boolean
allowPublicMethodsOnly()
Should only public methods be allowed to have caching semantics?protected abstract JCacheOperation<?>
findCacheOperation(Method method, Class<?> targetType)
Subclasses need to implement this to return the caching operation for the given method, if any.JCacheOperation<?>
getCacheOperation(Method method, Class<?> targetClass)
Return the cache operations for this method, ornull
if the method contains no JSR-107 related metadata.
构造器详细资料
AbstractFallbackJCacheOperationSource
public AbstractFallbackJCacheOperationSource()
方法详细资料
getCacheOperation
public JCacheOperation<?> getCacheOperation(Method method, @Nullable Class<?> targetClass)
从接口复制的说明:JCacheOperationSource
Return the cache operations for this method, ornull
if the method contains no JSR-107 related metadata.- 指定者:
getCacheOperation
在接口中JCacheOperationSource
- 参数:
method
- the method to introspecttargetClass
- the target class (may benull
, in which case the declaring class of the method must be used)- 返回:
- the cache operation for this method, or
null
if none found
findCacheOperation
@Nullable protected abstract JCacheOperation<?> findCacheOperation(Method method, @Nullable Class<?> targetType)
Subclasses need to implement this to return the caching operation for the given method, if any.- 参数:
method
- the method to retrieve the operation fortargetType
- the target class- 返回:
- the cache operation associated with this method (or
null
if none)
allowPublicMethodsOnly
protected boolean allowPublicMethodsOnly()
Should only public methods be allowed to have caching semantics?The default implementation returns
false
.