public abstract class AbstractCacheResolver extends Object implements CacheResolver, InitializingBean
CacheResolver implementation that requires the concrete
 implementation to provide the collection of cache name(s) based on the
 invocation context.| Modifier | Constructor and Description | 
|---|---|
| protected  | AbstractCacheResolver()Construct a new  AbstractCacheResolver. | 
| protected  | AbstractCacheResolver(CacheManager cacheManager)Construct a new  AbstractCacheResolverfor the givenCacheManager. | 
| Modifier and Type | Method and Description | 
|---|---|
| void | afterPropertiesSet()Invoked by the containing  BeanFactoryafter it has set all bean properties
 and satisfiedBeanFactoryAware,ApplicationContextAwareetc. | 
| CacheManager | getCacheManager()Return the  CacheManagerthat this instance uses. | 
| protected abstract Collection<String> | getCacheNames(CacheOperationInvocationContext<?> context)Provide the name of the cache(s) to resolve against the current cache manager. | 
| Collection<? extends Cache> | resolveCaches(CacheOperationInvocationContext<?> context)Return the cache(s) to use for the specified invocation. | 
| void | setCacheManager(CacheManager cacheManager)Set the  CacheManagerthat this instance should use. | 
protected AbstractCacheResolver()
AbstractCacheResolver.protected AbstractCacheResolver(CacheManager cacheManager)
AbstractCacheResolver for the given CacheManager.cacheManager - the CacheManager to usepublic void setCacheManager(CacheManager cacheManager)
CacheManager that this instance should use.public CacheManager getCacheManager()
CacheManager that this instance uses.public void afterPropertiesSet()
InitializingBeanBeanFactory after it has set all bean properties
 and satisfied BeanFactoryAware, ApplicationContextAware etc.
 This method allows the bean instance to perform validation of its overall configuration and final initialization when all bean properties have been set.
afterPropertiesSet in interface InitializingBeanpublic Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context)
CacheResolverresolveCaches in interface CacheResolvercontext - the context of the particular invocationnull)@Nullable protected abstract Collection<String> getCacheNames(CacheOperationInvocationContext<?> context)
It is acceptable to return null to indicate that no cache could
 be resolved for this invocation.
context - the context of the particular invocationnull if no cache should be resolved