protected class CacheAspectSupport.CacheOperationContext extends java.lang.Object implements CacheOperationInvocationContext<CacheOperation>
Modifier and Type | Field and Description |
---|---|
private java.lang.Object[] |
args |
private java.util.Collection<? extends Cache> |
caches |
private CacheAspectSupport.CacheOperationMetadata |
metadata |
private MethodCacheKey |
methodCacheKey |
private java.lang.Object |
target |
Constructor and Description |
---|
CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata,
java.lang.Object[] args,
java.lang.Object target) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canPutToCache(java.lang.Object value) |
private EvaluationContext |
createEvaluationContext(java.lang.Object result) |
private java.lang.Object[] |
extractArgs(java.lang.reflect.Method method,
java.lang.Object[] args) |
protected java.lang.Object |
generateKey(java.lang.Object result)
Computes the key for the given caching operation.
|
java.lang.Object[] |
getArgs()
Return the argument used to invoke the method
|
protected java.util.Collection<? extends Cache> |
getCaches() |
java.lang.reflect.Method |
getMethod()
Return the method
|
CacheOperation |
getOperation()
Return the cache operation
|
java.lang.Object |
getTarget()
Return the target instance on which the method was invoked
|
protected boolean |
isConditionPassing(java.lang.Object result) |
private final CacheAspectSupport.CacheOperationMetadata metadata
private final java.lang.Object[] args
private final java.lang.Object target
private final java.util.Collection<? extends Cache> caches
private final MethodCacheKey methodCacheKey
public CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata, java.lang.Object[] args, java.lang.Object target)
public CacheOperation getOperation()
CacheOperationInvocationContext
getOperation
in interface CacheOperationInvocationContext<CacheOperation>
public java.lang.Object getTarget()
CacheOperationInvocationContext
getTarget
in interface CacheOperationInvocationContext<CacheOperation>
public java.lang.reflect.Method getMethod()
CacheOperationInvocationContext
getMethod
in interface CacheOperationInvocationContext<CacheOperation>
public java.lang.Object[] getArgs()
CacheOperationInvocationContext
getArgs
in interface CacheOperationInvocationContext<CacheOperation>
private java.lang.Object[] extractArgs(java.lang.reflect.Method method, java.lang.Object[] args)
protected boolean isConditionPassing(java.lang.Object result)
protected boolean canPutToCache(java.lang.Object value)
protected java.lang.Object generateKey(java.lang.Object result)
private EvaluationContext createEvaluationContext(java.lang.Object result)
protected java.util.Collection<? extends Cache> getCaches()