Package javax.cache.annotation
Interface CacheResolverFactory
public interface CacheResolverFactory
Determines the
CacheResolver
to use for an annotated method. The
CacheResolver
will be retrieved once per annotated method.
Implementations MUST be thread-safe.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiongetCacheResolver
(CacheMethodDetails<? extends Annotation> cacheMethodDetails) Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
,CachePut
,CacheRemove
, orCacheRemoveAll
annotation.getExceptionCacheResolver
(CacheMethodDetails<CacheResult> cacheMethodDetails) Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
annotation to cache exceptions.
-
Method Details
-
getCacheResolver
Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
,CachePut
,CacheRemove
, orCacheRemoveAll
annotation.- Parameters:
cacheMethodDetails
- The details of the annotated method to get theCacheResolver
for. @return TheCacheResolver
instance to be used by the interceptor.
-
getExceptionCacheResolver
Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
annotation to cache exceptions.Will only be called if
CacheResult.exceptionCacheName()
is not empty.- Parameters:
cacheMethodDetails
- The details of the annotated method to get theCacheResolver
for.- Returns:
- The
CacheResolver
instance to be used by the interceptor.
-