public class NamedCacheResolver extends AbstractCacheResolver
CacheResolver
that forces the resolution to a configurable
collection of name(s) against a given CacheManager
.Constructor and Description |
---|
NamedCacheResolver() |
NamedCacheResolver(CacheManager cacheManager,
java.lang.String... cacheNames) |
Modifier and Type | Method and Description |
---|---|
protected java.util.Collection<java.lang.String> |
getCacheNames(CacheOperationInvocationContext<?> context)
Provide the name of the cache(s) to resolve against the current cache manager.
|
void |
setCacheNames(java.util.Collection<java.lang.String> cacheNames)
Set the cache name(s) that this resolver should use.
|
afterPropertiesSet, getCacheManager, resolveCaches, setCacheManager
public NamedCacheResolver()
public NamedCacheResolver(CacheManager cacheManager, java.lang.String... cacheNames)
public void setCacheNames(java.util.Collection<java.lang.String> cacheNames)
protected java.util.Collection<java.lang.String> getCacheNames(CacheOperationInvocationContext<?> context)
AbstractCacheResolver
It is acceptable to return null
to indicate that no cache could
be resolved for this invocation.
getCacheNames
in class AbstractCacheResolver
context
- the context of the particular invocationnull
if no cache should be resolved