public class FixUseSupperClassCacheOperationSource extends FixUseSupperClassFallbackCacheOperationSource implements Serializable
CacheOperationSource interface for working with caching metadata in annotation format.
This class reads Spring's Cacheable, CachePut and CacheEvict
annotations and exposes corresponding caching operation definition to Spring's cache
infrastructure. This class may also serve as base class for a custom
CacheOperationSource.
| 限定符和类型 | 类和说明 |
|---|---|
protected static interface |
FixUseSupperClassCacheOperationSource.CacheOperationProvider
Callback interface providing
CacheOperation instance(s) based on
a given CacheAnnotationParser. |
logger| 构造器和说明 |
|---|
FixUseSupperClassCacheOperationSource()
Create a default AnnotationCacheOperationSource, supporting public methods
that carry the
Cacheable and CacheEvict annotations. |
FixUseSupperClassCacheOperationSource(boolean publicMethodsOnly)
Create a default
AnnotationCacheOperationSource, supporting public methods
that carry the Cacheable and CacheEvict annotations. |
FixUseSupperClassCacheOperationSource(FixUseSupperClassCacheAnnotationParser... annotationParsers)
Create a custom AnnotationCacheOperationSource.
|
FixUseSupperClassCacheOperationSource(FixUseSupperClassCacheAnnotationParser annotationParser)
Create a custom AnnotationCacheOperationSource.
|
FixUseSupperClassCacheOperationSource(Set<FixUseSupperClassCacheAnnotationParser> annotationParsers)
Create a custom AnnotationCacheOperationSource.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected boolean |
allowPublicMethodsOnly()
By default, only public methods can be made cacheable.
|
protected Collection<org.springframework.cache.interceptor.CacheOperation> |
determineCacheOperations(FixUseSupperClassCacheOperationSource.CacheOperationProvider provider)
Determine the cache operation(s) for the given
FixUseSupperClassCacheOperationSource.CacheOperationProvider. |
boolean |
equals(Object other) |
protected Collection<org.springframework.cache.interceptor.CacheOperation> |
findCacheOperations(Class<?> clazz)
Subclasses need to implement this to return the caching attribute
for the given class, if any.
|
protected Collection<org.springframework.cache.interceptor.CacheOperation> |
findCacheOperations(Class<?> targetClass,
Method method)
Subclasses need to implement this to return the caching attribute
for the given method, if any.
|
int |
hashCode() |
void |
setPublicMethodsOnly(boolean publicMethodsOnly) |
getCacheKey, getCacheOperationspublic FixUseSupperClassCacheOperationSource()
Cacheable and CacheEvict annotations.public FixUseSupperClassCacheOperationSource(boolean publicMethodsOnly)
AnnotationCacheOperationSource, supporting public methods
that carry the Cacheable and CacheEvict annotations.publicMethodsOnly - whether to support only annotated public methods
typically for use with proxy-based AOP), or protected/private methods as well
(typically used with AspectJ class weaving)public FixUseSupperClassCacheOperationSource(FixUseSupperClassCacheAnnotationParser annotationParser)
annotationParser - the CacheAnnotationParser to usepublic FixUseSupperClassCacheOperationSource(FixUseSupperClassCacheAnnotationParser... annotationParsers)
annotationParsers - the CacheAnnotationParser to usepublic FixUseSupperClassCacheOperationSource(Set<FixUseSupperClassCacheAnnotationParser> annotationParsers)
annotationParsers - the CacheAnnotationParser to useprotected Collection<org.springframework.cache.interceptor.CacheOperation> findCacheOperations(Class<?> targetClass, Method method)
findCacheOperations 在类中 FixUseSupperClassFallbackCacheOperationSourcemethod - the method to retrieve the attribute fornull if none)protected Collection<org.springframework.cache.interceptor.CacheOperation> findCacheOperations(Class<?> clazz)
findCacheOperations 在类中 FixUseSupperClassFallbackCacheOperationSourceclazz - the class to retrieve the attribute fornull if none)protected Collection<org.springframework.cache.interceptor.CacheOperation> determineCacheOperations(FixUseSupperClassCacheOperationSource.CacheOperationProvider provider)
FixUseSupperClassCacheOperationSource.CacheOperationProvider.
This implementation delegates to configured
CacheAnnotationParsers for parsing known annotations into
Spring's metadata attribute class.
Can be overridden to support custom annotations that carry caching metadata.
provider - the cache operation provider to usenull if none foundprotected boolean allowPublicMethodsOnly()
public void setPublicMethodsOnly(boolean publicMethodsOnly)
Copyright © 2016–2019. All rights reserved.