类 NamedCacheResolver
- java.lang.Object
- org.springframework.cache.interceptor.AbstractCacheResolver
- org.springframework.cache.interceptor.NamedCacheResolver
- 所有已实现的接口:
InitializingBean,CacheResolver
public class NamedCacheResolver extends AbstractCacheResolver
ACacheResolverthat forces the resolution to a configurable collection of name(s) against a givenCacheManager.- 从以下版本开始:
- 4.1
- 作者:
- Stephane Nicoll
构造器概要
构造器 构造器 说明 NamedCacheResolver()NamedCacheResolver(CacheManager cacheManager, String... cacheNames)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected Collection<String>getCacheNames(CacheOperationInvocationContext<?> context)Provide the name of the cache(s) to resolve against the current cache manager.voidsetCacheNames(Collection<String> cacheNames)Set the cache name(s) that this resolver should use.从类继承的方法 org.springframework.cache.interceptor.AbstractCacheResolver
afterPropertiesSet, getCacheManager, resolveCaches, setCacheManager
构造器详细资料
NamedCacheResolver
public NamedCacheResolver()
NamedCacheResolver
public NamedCacheResolver(CacheManager cacheManager, String... cacheNames)
方法详细资料
setCacheNames
public void setCacheNames(Collection<String> cacheNames)
Set the cache name(s) that this resolver should use.
getCacheNames
protected Collection<String> getCacheNames(CacheOperationInvocationContext<?> context)
从类复制的说明:AbstractCacheResolverProvide the name of the cache(s) to resolve against the current cache manager.It is acceptable to return
nullto indicate that no cache could be resolved for this invocation.- 指定者:
getCacheNames在类中AbstractCacheResolver- 参数:
context- the context of the particular invocation- 返回:
- the cache name(s) to resolve, or
nullif no cache should be resolved