abstract class AbstractJCacheKeyOperation<A extends java.lang.annotation.Annotation> extends AbstractJCacheOperation<A>
JCacheOperation that operates with a key.AbstractJCacheOperation.CacheInvocationParameterImpl, AbstractJCacheOperation.CacheParameterDetail| Modifier and Type | Field and Description |
|---|---|
private KeyGenerator |
keyGenerator |
private java.util.List<AbstractJCacheOperation.CacheParameterDetail> |
keyParameterDetails |
allParameterDetails| Modifier | Constructor and Description |
|---|---|
protected |
AbstractJCacheKeyOperation(<any> methodDetails,
CacheResolver cacheResolver,
KeyGenerator keyGenerator)
Create a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
KeyGenerator |
getKeyGenerator()
Return the
KeyGenerator to use to compute cache keys. |
CacheInvocationParameter[] |
getKeyParameters(java.lang.Object... values)
Return the
CacheInvocationParameter for the parameters that are to be
used to compute the key. |
private static java.util.List<AbstractJCacheOperation.CacheParameterDetail> |
initializeKeyParameterDetails(java.util.List<AbstractJCacheOperation.CacheParameterDetail> allParameters) |
createExceptionTypeFilter, getAllParameters, getAnnotations, getCacheAnnotation, getCacheName, getCacheNames, getCacheResolver, getExceptionTypeFilter, getMethod, getOperationDescription, toStringprivate final KeyGenerator keyGenerator
private final java.util.List<AbstractJCacheOperation.CacheParameterDetail> keyParameterDetails
protected AbstractJCacheKeyOperation(<any> methodDetails,
CacheResolver cacheResolver,
KeyGenerator keyGenerator)
methodDetails - the CacheMethodDetails related to the cached methodcacheResolver - the cache resolver to resolve regular cacheskeyGenerator - the key generator to compute cache keyspublic KeyGenerator getKeyGenerator()
KeyGenerator to use to compute cache keys.public CacheInvocationParameter[] getKeyParameters(java.lang.Object... values)
CacheInvocationParameter for the parameters that are to be
used to compute the key.
Per the spec, if some method parameters are annotated with
javax.cache.annotation.CacheKey, only those parameters should be part
of the key. If none are annotated, all parameters except the parameter annotated
with javax.cache.annotation.CacheValue should be part of the key.
The method arguments must match the signature of the related method invocation
values - the parameters value for a particular invocationCacheInvocationParameter instances for the parameters to be
used to compute the keyprivate static java.util.List<AbstractJCacheOperation.CacheParameterDetail> initializeKeyParameterDetails(java.util.List<AbstractJCacheOperation.CacheParameterDetail> allParameters)