javax.cache.annotation
Interface CacheKeyInvocationContext<A extends Annotation>
- Type Parameters:
A
- The type of annotation this context information is for. One of CacheResult
,
CachePut
, or CacheRemoveEntry
- All Superinterfaces:
- CacheInvocationContext<A>, CacheMethodDetails<A>
public interface CacheKeyInvocationContext<A extends Annotation>
- extends CacheInvocationContext<A>
Runtime information about an intercepted method invocation for a method annotated
with CacheResult
, CachePut
, or CacheRemoveEntry
.
Used with CacheKeyGenerator.generateCacheKey(CacheKeyInvocationContext)
to generate a
CacheKey
for the invocation.
- Version:
- $Revision$
- Author:
- Eric Dalquist
- See Also:
CacheKeyGenerator
getKeyParameters
CacheInvocationParameter[] getKeyParameters()
- Returns a clone of the array of all method parameters to be used by the
CacheKeyGenerator
in creating
a CacheKey
. The returned array may be the same as or a subset of the array returned by
CacheInvocationContext.getAllParameters()
Parameters in this array are selected by the following rules:
- Returns:
- An array of all parameters to be used in cache key generation
getValueParameter
CacheInvocationParameter getValueParameter()
- When a method is annotated with
CachePut
this is the parameter annotated with CacheValue
- Returns:
- The parameter to cache, will never be null for methods annotated with
CachePut
, will be null for methods not annotated with CachePut
Copyright © 2013. All Rights Reserved.