|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
A
- The type of annotation this context information is for. One of CacheResult
,
CachePut
, CacheRemoveEntry
, or
CacheRemoveAll
.public interface CacheKeyInvocationContext<A extends Annotation>
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.
CacheKeyGenerator
Method Summary | |
---|---|
CacheInvocationParameter[] |
getKeyParameters()
Returns a clone of the array of all method parameters to be used by the CacheKeyGenerator in creating
a CacheKey . |
CacheInvocationParameter |
getValueParameter()
When a method is annotated with CachePut one parameter is the value to be cached. |
Methods inherited from interface javax.cache.interceptor.CacheInvocationContext |
---|
getAllParameters, getTarget, unwrap |
Methods inherited from interface javax.cache.interceptor.CacheMethodDetails |
---|
getAnnotations, getCacheAnnotation, getCacheName, getMethod |
Method Detail |
---|
CacheInvocationParameter[] getKeyParameters()
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:
CacheKeyParam
or CacheValue
then all parameters are includedCacheValue
annotation exists and no CacheKeyParam
then all parameters except the one annotated with CacheValue
are includedCacheKeyParam
annotations exist only those parameters with the CacheKeyParam
annotation are included
CacheInvocationParameter getValueParameter()
CachePut
one parameter is the value to be cached.
The cached value is selected by the following rules:
CacheValue
annotation exists the parameter with the annotation is the cached valueCacheValue
annotation exists and there is only one parameter it is the cached valueCacheValue
annotation exists and there is more than one parameter an undefined exception will be thrown by the implementation
CachePut
, will be null for methods not annotated with CachePut
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |