public abstract class AbstractFallbackJCacheOperationSource extends Object implements JCacheOperationSource
JCacheOperationSource
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.
AbstractFallbackCacheOperationSource
Constructor and Description |
---|
AbstractFallbackJCacheOperationSource() |
Modifier and Type | Method and Description |
---|---|
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, or
null
if the method contains no JSR-107 related metadata. |
protected final Log logger
public AbstractFallbackJCacheOperationSource()
public JCacheOperation<?> getCacheOperation(Method method, Class<?> targetClass)
JCacheOperationSource
null
if the method contains no JSR-107 related metadata.getCacheOperation
in interface JCacheOperationSource
method
- the method to introspecttargetClass
- the target class (may be null
, in which case
the declaring class of the method must be used)null
if none foundprotected abstract JCacheOperation<?> findCacheOperation(Method method, Class<?> targetType)
method
- the method to retrieve the operation fortargetType
- the target classnull
if none)protected boolean allowPublicMethodsOnly()
The default implementation returns false
.