Package javax.cache.annotation
Interface CacheKeyGenerator
public interface CacheKeyGenerator
Generates a
GeneratedCacheKey
based on
a CacheKeyInvocationContext
.
Implementations must be thread-safe.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptiongenerateCacheKey
(CacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext) Called for each intercepted method invocation to generate a suitable cache key (as aGeneratedCacheKey
) from theCacheKeyInvocationContext
data.
-
Method Details
-
generateCacheKey
GeneratedCacheKey generateCacheKey(CacheKeyInvocationContext<? extends Annotation> cacheKeyInvocationContext) Called for each intercepted method invocation to generate a suitable cache key (as aGeneratedCacheKey
) from theCacheKeyInvocationContext
data.- Parameters:
cacheKeyInvocationContext
- Information about the intercepted method invocation- Returns:
- A non-null cache key for the invocation.
-