org.springframework.cache.interceptor

## 类 CacheAspectSupport.CacheOperationContext

- java.lang.Object
- - org.springframework.cache.interceptor.CacheAspectSupport.CacheOperationContext

- 所有已实现的接口:
    CacheOperationInvocationContext<CacheOperation>
  封闭类:
    CacheAspectSupport

      protected class CacheAspectSupport.CacheOperationContext
      extends Object
      implements CacheOperationInvocationContext<CacheOperation>

  A `CacheOperationInvocationContext` context for a `CacheOperation`.

- - ### 构造器概要

    构造器
    构造器和说明
    `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)`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 构造器详细资料

    - #### CacheOperationContext

          public CacheOperationContext(CacheAspectSupport.CacheOperationMetadata metadata,
                                       Object[] args,
                                       Object target)

  - ### 方法详细资料

    - #### getOperation

          public CacheOperation getOperation()

      从接口复制的说明: `CacheOperationInvocationContext`
      Return the cache operation.
      指定者:
        `getOperation` 在接口中 `CacheOperationInvocationContext<CacheOperation>`

    - #### getTarget

          public Object getTarget()

      从接口复制的说明: `CacheOperationInvocationContext`
      Return the target instance on which the method was invoked.
      指定者:
        `getTarget` 在接口中 `CacheOperationInvocationContext<CacheOperation>`

    - #### getMethod

          public Method getMethod()

      从接口复制的说明: `CacheOperationInvocationContext`
      Return the method which was invoked.
      指定者:
        `getMethod` 在接口中 `CacheOperationInvocationContext<CacheOperation>`

    - #### getArgs

          public Object[] getArgs()

      从接口复制的说明: `CacheOperationInvocationContext`
      Return the argument list used to invoke the method.
      指定者:
        `getArgs` 在接口中 `CacheOperationInvocationContext<CacheOperation>`

    - #### 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()