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
Author:
Eric Dalquist

Method Summary
 CacheResolver getCacheResolver(CacheMethodDetails<? extends Annotation> cacheMethodDetails)
          Get the CacheResolver used at runtime for resolution of the Cache for the CacheResult, CachePut, CacheRemoveEntry, or CacheRemoveAll annotation.
 CacheResolver getExceptionCacheResolver(CacheMethodDetails<CacheResult> cacheMethodDetails)
          Get the CacheResolver used at runtime for resolution of the Cache for the CacheResult annotation to cache exceptions.
 

Method Detail

getCacheResolver

CacheResolver getCacheResolver(CacheMethodDetails<? extends Annotation> cacheMethodDetails)
Get the CacheResolver used at runtime for resolution of the Cache for the CacheResult, CachePut, CacheRemoveEntry, or CacheRemoveAll annotation.

Parameters:
cacheMethodDetails - The details of the annotated method to get the CacheResolver for.
Returns:
The CacheResolver instance to be used by the intercepter.

getExceptionCacheResolver

CacheResolver getExceptionCacheResolver(CacheMethodDetails<CacheResult> cacheMethodDetails)
Get the CacheResolver used at runtime for resolution of the Cache for the CacheResult annotation to cache exceptions.

Will only be called if CacheResult.exceptionCacheName() is not empty.

Parameters:
cacheMethodDetails - The details of the annotated method to get the CacheResolver for.
Returns:
The CacheResolver instance to be used by the intercepter.


Copyright © 2012. All Rights Reserved.