类 CacheAspectSupport.CacheOperationContext
- java.lang.Object
- org.springframework.cache.interceptor.CacheAspectSupport.CacheOperationContext
protected class CacheAspectSupport.CacheOperationContext extends Object implements CacheOperationInvocationContext<CacheOperation>
ACacheOperationInvocationContext
context for aCacheOperation
.
构造器概要
构造器 构造器 说明 CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata, Object[] args, Object target)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected boolean
canPutToCache(Object value)
protected Object
generateKey(Object result)
Compute the key for the given caching operation.Object[]
getArgs()
Return the argument list used to invoke the method.protected Collection<String>
getCacheNames()
protected Collection<? extends Cache>
getCaches()
Method
getMethod()
Return the method which was invoked.CacheOperation
getOperation()
Return the cache operation.Object
getTarget()
Return the target instance on which the method was invoked.protected boolean
isConditionPassing(Object result)
构造器详细资料
CacheOperationContext
public CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata, Object[] args, Object target)
方法详细资料
getOperation
public CacheOperation getOperation()
从接口复制的说明:CacheOperationInvocationContext
Return the cache operation.
getTarget
public Object getTarget()
从接口复制的说明:CacheOperationInvocationContext
Return the target instance on which the method was invoked.
getMethod
public Method getMethod()
从接口复制的说明:CacheOperationInvocationContext
Return the method which was invoked.
getArgs
public Object[] getArgs()
从接口复制的说明:CacheOperationInvocationContext
Return the argument list used to invoke the method.
isConditionPassing
protected boolean isConditionPassing(@Nullable Object result)
canPutToCache
protected boolean canPutToCache(@Nullable Object value)
generateKey
@Nullable protected Object generateKey(@Nullable Object result)
Compute the key for the given caching operation.
getCaches
protected Collection<? extends Cache> getCaches()
getCacheNames
protected Collection<String> getCacheNames()