A
- The type of annotation this context information is for. One of CacheResult
,
CachePut
, or CacheRemoveEntry
public interface CacheKeyInvocationContext<A extends Annotation> extends CacheInvocationContext<A>
CacheResult
, CachePut
, or CacheRemoveEntry
.
Used with CacheKeyGenerator.generateCacheKey(CacheKeyInvocationContext)
to generate a
GeneratedCacheKey
for the invocation.CacheKeyGenerator
Modifier and Type | Method and Description |
---|---|
CacheInvocationParameter[] |
getKeyParameters()
Returns a clone of the array of all method parameters to be used by the
CacheKeyGenerator in creating
a GeneratedCacheKey . |
CacheInvocationParameter |
getValueParameter()
When a method is annotated with
CachePut this is the parameter annotated with CacheValue |
getAllParameters, getTarget, unwrap
getAnnotations, getCacheAnnotation, getCacheName, getMethod
CacheInvocationParameter[] getKeyParameters()
CacheKeyGenerator
in creating
a GeneratedCacheKey
. 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:
CacheKey
or CacheValue
then all parameters are includedCacheValue
annotation exists and no CacheKey
then all parameters except the one annotated with CacheValue
are includedCacheKey
annotations exist only those parameters with the CacheKey
annotation are includedCacheInvocationParameter getValueParameter()
CachePut
this is the parameter annotated with CacheValue
Copyright © 2013. All Rights Reserved.