Interface CacheResolver
- All Known Implementing Classes:
AbstractCacheResolver
,NamedCacheResolver
,SimpleCacheResolver
,SimpleExceptionCacheResolver
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface CacheResolver
Determine theCache
instance(s) to use for an intercepted method invocation.Implementations must be thread-safe.
- Since:
- 4.1
- Author:
- Stephane Nicoll
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Collection<? extends Cache>
resolveCaches(CacheOperationInvocationContext<?> context)
Return the cache(s) to use for the specified invocation.
Method Detail
resolveCaches
Collection<? extends Cache> resolveCaches(CacheOperationInvocationContext<?> context)
Return the cache(s) to use for the specified invocation.- Parameters:
context
- the context of the particular invocation- Returns:
- the cache(s) to use (never
null
) - Throws:
IllegalStateException
- if cache resolution failed