Interface CacheAnnotationParser
- All Known Implementing Classes:
SpringCacheAnnotationParser
public interface CacheAnnotationParser
Strategy interface for parsing known caching annotation types.AnnotationCacheOperationSource
delegates to such parsers for supporting specific annotation types such as Spring's ownCacheable
,CachePut
andCacheEvict
.- Since:
- 3.1
- Author:
- Costin Leau, Stephane Nicoll
- See Also:
AnnotationCacheOperationSource
,SpringCacheAnnotationParser
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<CacheOperation>
parseCacheAnnotations(Class<?> type)
Parse the cache definition for the given class, based on an annotation type understood by this parser.Collection<CacheOperation>
parseCacheAnnotations(Method method)
Parse the cache definition for the given method, based on an annotation type understood by this parser.
Method Detail
parseCacheAnnotations
Collection<CacheOperation> parseCacheAnnotations(Class<?> type)
Parse the cache definition for the given class, based on an annotation type understood by this parser.This essentially parses a known cache annotation into Spring's metadata attribute class. Returns
null
if the class is not cacheable.- Parameters:
type
- the annotated class- Returns:
- the configured caching operation, or
null
if none found - See Also:
AnnotationCacheOperationSource.findCacheOperations(Class)
parseCacheAnnotations
Collection<CacheOperation> parseCacheAnnotations(Method method)
Parse the cache definition for the given method, based on an annotation type understood by this parser.This essentially parses a known cache annotation into Spring's metadata attribute class. Returns
null
if the method is not cacheable.- Parameters:
method
- the annotated method- Returns:
- the configured caching operation, or
null
if none found - See Also:
AnnotationCacheOperationSource.findCacheOperations(Method)