Package javax.cache.annotation
Interface CacheResolverFactory
-
public interface CacheResolverFactory
Determines theCacheResolver
to use for an annotated method. TheCacheResolver
will be retrieved once per annotated method.Implementations MUST be thread-safe.
- Since:
- 1.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CacheResolver
getCacheResolver(CacheMethodDetails<? extends java.lang.annotation.Annotation> cacheMethodDetails)
Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
,CachePut
,CacheRemove
, orCacheRemoveAll
annotation.CacheResolver
getExceptionCacheResolver(CacheMethodDetails<CacheResult> cacheMethodDetails)
Get theCacheResolver
used at runtime for resolution of theCache
for theCacheResult
annotation to cache exceptions.
-
-
-
Method Detail
-
getCacheResolver
CacheResolver getCacheResolver(CacheMethodDetails<? extends java.lang.annotation.Annotation> cacheMethodDetails)
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
CacheResolver getExceptionCacheResolver(CacheMethodDetails<CacheResult> cacheMethodDetails)
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.
-
-