クラス JCacheAspectSupport

java.lang.ObjectSE
org.springframework.cache.interceptor.AbstractCacheInvoker
org.springframework.cache.jcache.interceptor.JCacheAspectSupport
実装されたすべてのインターフェース:
InitializingBean
既知の直属サブクラス
JCacheInterceptor

public class JCacheAspectSupport extends AbstractCacheInvoker implements InitializingBean
JCacheInterceptor や AspectJ アスペクトなどの JSR-107 キャッシングアスペクトの基本クラス。

キャッシュ関連の操作には、Spring キャッシング抽象化を使用します。標準の JSR-107 キャッシュアノテーションを処理するために、JSR-107 Cache または CacheManager は必要ありません。

JCacheOperationSource は、キャッシュ操作を決定するために使用されます

JCacheOperationSource がシリアライズ可能であれば、キャッシュアスペクトはシリアライズ可能です。

導入:
4.1
作成者:
Stephane Nicoll
関連事項:
  • フィールドの詳細

    • logger

      protected final Log logger
  • コンストラクターの詳細

    • JCacheAspectSupport

      public JCacheAspectSupport()
  • メソッドの詳細

    • setCacheOperationSource

      public void setCacheOperationSource(JCacheOperationSource cacheOperationSource)
      このキャッシュアスペクトの CacheOperationSource を設定します。
    • getCacheOperationSource

      public JCacheOperationSource getCacheOperationSource()
      このキャッシュアスペクトの CacheOperationSource を返します。
    • afterPropertiesSet

      public void afterPropertiesSet()
      インターフェースからコピーされた説明: InitializingBean
      すべての Bean プロパティを設定し、BeanFactoryAwareApplicationContextAware などを満たした後、包含 BeanFactory によって呼び出されます。

      このメソッドにより、Bean インスタンスは、すべての Bean プロパティが設定されたときに、その全体的な構成の検証と最終的な初期化を実行できます。

      次で指定:
      インターフェース InitializingBeanafterPropertiesSet 
    • execute

      @Nullable protected ObjectSE execute(CacheOperationInvoker invoker, ObjectSE target, MethodSE method, ObjectSE[] args)
    • invokeOperation

      @Nullable protected ObjectSE invokeOperation(CacheOperationInvoker invoker)
      基盤となる操作を実行し(通常はキャッシュミスの場合)、呼び出しの結果を返します。例外が発生すると、ThrowableWrapper でラップされます。例外は処理または変更できますが、ThrowableWrapper でもラップする必要あります。
      パラメーター:
      invoker - キャッシュされている操作を処理する呼び出し元
      戻り値:
      呼び出しの結果
      関連事項: