KeyGenerator implementation that either delegates to a standard JSR-107
javax.cache.annotation.CacheKeyGenerator , or wrap a standard KeyGenerator
so that only relevant parameters are handled.
| Modifier and Type | Field and Description |
|---|---|
| private CacheKeyGenerator | |
| private final JCacheOperationSource | |
| private KeyGenerator |
| Access | Constructor and Description |
|---|---|
| public | KeyGeneratorAdapter(JCacheOperationSource cacheOperationSource, KeyGenerator target)
Create an instance with the given |
| public | KeyGeneratorAdapter(JCacheOperationSource cacheOperationSource, CacheKeyGenerator target)
Create an instance used to wrap the specified |
| Modifier and Type | Method and Description |
|---|---|
| private CacheKeyInvocationContext | |
| private static Object | |
| public Object | generate(Object
the target instance target, Method the method being called method, Object... the method parameters (with any var-args expanded) params)Implements org. Generate a key for the given method and its parameters. |
| public Object | getTarget()
Return the target key generator to use in the form of either a |
| cacheKeyGenerator | back to summary |
|---|---|
| private CacheKeyGenerator cacheKeyGenerator
| |
| cacheOperationSource | back to summary |
|---|---|
| private final JCacheOperationSource cacheOperationSource | |
| keyGenerator | back to summary |
|---|---|
| private KeyGenerator keyGenerator
| |
| KeyGeneratorAdapter | back to summary |
|---|---|
| public KeyGeneratorAdapter(JCacheOperationSource cacheOperationSource, KeyGenerator target) Create an instance with the given | |
| KeyGeneratorAdapter | back to summary |
|---|---|
| public KeyGeneratorAdapter(JCacheOperationSource cacheOperationSource, CacheKeyGenerator target) Create an instance used to wrap the specified | |
| createCacheKeyInvocationContext | back to summary |
|---|---|
private CacheKeyInvocationContext
| |
| doGenerate | back to summary |
|---|---|
| private static Object doGenerate(KeyGenerator keyGenerator, CacheKeyInvocationContext<?> context) | |
| generate | back to summary |
|---|---|
| public Object generate(Object target, Method method, Object... params) Implements org. Doc from org. Generate a key for the given method and its parameters. | |
| getTarget | back to summary |
|---|---|
| public Object getTarget() Return the target key generator to use in the form of either a | |