public class DefaultL2CacheAnnotationParser extends Object implements L2CacheAnnotationParser, Serializable
| 限定符和类型 | 字段和说明 |
|---|---|
private static Set<Class<? extends Annotation>> |
CACHE_OPERATION_ANNOTATIONS |
| 构造器和说明 |
|---|
DefaultL2CacheAnnotationParser() |
| 限定符和类型 | 方法和说明 |
|---|---|
private Collection<L2CacheOperation> |
commonParseCacheAnnotations(AnnotatedElement ae) |
boolean |
isCandidateClass(Class<?> targetClass)
Determine whether the given class is a candidate for cache operations
in the annotation format of this
CacheAnnotationParser. |
private L2CacheableOperation |
parseCacheableAnnotation(AnnotatedElement ae,
L2Cacheable cacheable) |
private Collection<L2CacheOperation> |
parseCacheAnnotations(AnnotatedElement ae,
boolean localOnly) |
Collection<L2CacheOperation> |
parseCacheAnnotations(Class<?> type)
Parse the cache definition for the given class,
based on an annotation type understood by this parser.
|
Collection<L2CacheOperation> |
parseCacheAnnotations(Method method)
Parse the cache definition for the given method,
based on an annotation type understood by this parser.
|
private void |
parseCachingAnnotation(AnnotatedElement ae,
L2Caching caching,
Collection<L2CacheOperation> ops) |
private L2CacheEvictOperation |
parseEvictAnnotation(AnnotatedElement ae,
L2CacheEvict cacheEvict) |
private L2CachePutOperation |
parsePutAnnotation(AnnotatedElement ae,
L2CachePut cachePut) |
private static final Set<Class<? extends Annotation>> CACHE_OPERATION_ANNOTATIONS
public boolean isCandidateClass(Class<?> targetClass)
L2CacheAnnotationParserCacheAnnotationParser.
If this method returns false, the methods on the given class
will not get traversed for #parseCacheAnnotations introspection.
Returning false is therefore an optimization for non-affected
classes, whereas true simply means that the class needs to get
fully introspected for each method on the given class individually.
isCandidateClass 在接口中 L2CacheAnnotationParsertargetClass - the class to introspectfalse if the class is known to have no cache operation
annotations at class or method level; true otherwise. The default
implementation returns true, leading to regular introspection.public Collection<L2CacheOperation> parseCacheAnnotations(Class<?> type)
L2CacheAnnotationParserThis essentially parses a known cache annotation into Spring's metadata
attribute class. Returns null if the class is not cacheable.
parseCacheAnnotations 在接口中 L2CacheAnnotationParsertype - the annotated classnull if none foundpublic Collection<L2CacheOperation> parseCacheAnnotations(Method method)
L2CacheAnnotationParserThis essentially parses a known cache annotation into Spring's metadata
attribute class. Returns null if the method is not cacheable.
parseCacheAnnotations 在接口中 L2CacheAnnotationParsermethod - the annotated methodnull if none found@Nullable private Collection<L2CacheOperation> commonParseCacheAnnotations(AnnotatedElement ae)
@Nullable private Collection<L2CacheOperation> parseCacheAnnotations(AnnotatedElement ae, boolean localOnly)
private L2CacheableOperation parseCacheableAnnotation(AnnotatedElement ae, L2Cacheable cacheable)
private L2CacheEvictOperation parseEvictAnnotation(AnnotatedElement ae, L2CacheEvict cacheEvict)
private L2CachePutOperation parsePutAnnotation(AnnotatedElement ae, L2CachePut cachePut)
private void parseCachingAnnotation(AnnotatedElement ae, L2Caching caching, Collection<L2CacheOperation> ops)
Copyright © 2023. All rights reserved.