类 CacheAspectSupport.CacheOperationContext
- java.lang.Object
- org.springframework.cache.interceptor.CacheAspectSupport.CacheOperationContext
protected class CacheAspectSupport.CacheOperationContext extends Object implements CacheOperationInvocationContext<CacheOperation>
ACacheOperationInvocationContextcontext for aCacheOperation.
构造器概要
构造器 构造器 说明 CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata, Object[] args, Object target)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 protected booleancanPutToCache(Object value)protected ObjectgenerateKey(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()MethodgetMethod()Return the method which was invoked.CacheOperationgetOperation()Return the cache operation.ObjectgetTarget()Return the target instance on which the method was invoked.protected booleanisConditionPassing(Object result)
构造器详细资料
CacheOperationContext
public CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata, Object[] args, Object target)
方法详细资料
getOperation
public CacheOperation getOperation()
从接口复制的说明:CacheOperationInvocationContextReturn the cache operation.
getTarget
public Object getTarget()
从接口复制的说明:CacheOperationInvocationContextReturn the target instance on which the method was invoked.
getMethod
public Method getMethod()
从接口复制的说明:CacheOperationInvocationContextReturn the method which was invoked.
getArgs
public Object[] getArgs()
从接口复制的说明:CacheOperationInvocationContextReturn the argument list used to invoke the method.
isConditionPassing
protected boolean isConditionPassing(Object result)
canPutToCache
protected boolean canPutToCache(Object value)
generateKey
protected Object generateKey(Object result)
Compute the key for the given caching operation.- 返回:
- the generated key, or
nullif none can be generated
getCaches
protected Collection<? extends Cache> getCaches()
getCacheNames
protected Collection<String> getCacheNames()