クラス AnnotationJCacheOperationSource
java.lang.ObjectSE
org.springframework.cache.jcache.interceptor.AbstractFallbackJCacheOperationSource
org.springframework.cache.jcache.interceptor.AnnotationJCacheOperationSource
- 実装されているすべてのインターフェース:
JCacheOperationSource
- 既知の直属サブクラス
DefaultJCacheOperationSource
JSR-107
CacheResult
、CachePut
、CacheRemove
、CacheRemoveAll
アノテーションを読み取る JCacheOperationSource
インターフェースの実装。- 導入:
- 4.1
- 作成者:
- Stephane Nicoll, Juergen Hoeller
フィールドのサマリー
クラス org.springframework.cache.jcache.interceptor.AbstractFallbackJCacheOperationSource から継承されたフィールド
logger
コンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected org.springframework.cache.jcache.interceptor.CachePutOperation
createCachePutOperation
(MethodSE method, @Nullable javax.cache.annotation.CacheDefaults defaults, javax.cache.annotation.CachePut ann) protected org.springframework.cache.jcache.interceptor.CacheRemoveAllOperation
createCacheRemoveAllOperation
(MethodSE method, @Nullable javax.cache.annotation.CacheDefaults defaults, javax.cache.annotation.CacheRemoveAll ann) protected org.springframework.cache.jcache.interceptor.CacheRemoveOperation
createCacheRemoveOperation
(MethodSE method, @Nullable javax.cache.annotation.CacheDefaults defaults, javax.cache.annotation.CacheRemove ann) protected org.springframework.cache.jcache.interceptor.CacheResultOperation
createCacheResultOperation
(MethodSE method, @Nullable javax.cache.annotation.CacheDefaults defaults, javax.cache.annotation.CacheResult ann) protected StringSE
determineCacheName
(MethodSE method, @Nullable javax.cache.annotation.CacheDefaults defaults, StringSE candidate) protected @Nullable javax.cache.annotation.CacheResolverFactory
determineCacheResolverFactory
(@Nullable javax.cache.annotation.CacheDefaults defaults, ClassSE<? extends javax.cache.annotation.CacheResolverFactory> candidate) protected KeyGenerator
determineKeyGenerator
(@Nullable javax.cache.annotation.CacheDefaults defaults, ClassSE<? extends javax.cache.annotation.CacheKeyGenerator> candidate) protected @Nullable JCacheOperation
<?> findCacheOperation
(MethodSE method, @Nullable ClassSE<?> targetType) サブクラスは、これを実装して、指定されたメソッドのキャッシュ操作を返す必要があります(存在する場合)。protected StringSE
generateDefaultCacheName
(MethodSE method) 指定されたMethod
SE のデフォルトのキャッシュ名を生成します。protected abstract <T> T
指定されたキャッシュ戦略type
のインスタンスを検索または作成します。protected @Nullable javax.cache.annotation.CacheDefaults
getCacheDefaults
(MethodSE method, @Nullable ClassSE<?> targetType) protected CacheResolver
getCacheResolver
(@Nullable javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<?> details) protected abstract CacheResolver
何も設定されていない場合、デフォルトのCacheResolver
を返します。protected abstract CacheResolver
何も設定されていない場合、デフォルトの例外CacheResolver
を返します。protected abstract KeyGenerator
何も設定されていない場合、デフォルトのKeyGenerator
を返します。protected CacheResolver
getExceptionCacheResolver
(@Nullable javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<javax.cache.annotation.CacheResult> details) boolean
isCandidateClass
(ClassSE<?> targetClass) 指定されたクラスが、このJCacheOperationSource
のメタデータ形式のキャッシュ操作の候補であるかどうかを判断します。クラス org.springframework.cache.jcache.interceptor.AbstractFallbackJCacheOperationSource から継承されたメソッド
allowPublicMethodsOnly, getCacheOperation, hasCacheOperation
コンストラクターの詳細
AnnotationJCacheOperationSource
public AnnotationJCacheOperationSource()
メソッドの詳細
isCandidateClass
インターフェースからコピーされた説明:JCacheOperationSource
指定されたクラスが、このJCacheOperationSource
のメタデータ形式のキャッシュ操作の候補であるかどうかを判断します。このメソッドが
false
を返す場合、指定されたクラスのメソッドはJCacheOperationSource.getCacheOperation(java.lang.reflect.Method, java.lang.Class<?>)
イントロスペクションのために走査されません。false
を返すことは、影響を受けないクラスの最適化です。一方、true
は、クラスが特定のクラスの各メソッドに対して個別に完全にイントロスペクションする必要があることを意味します。- パラメーター:
targetClass
- イントロスペクトするクラス- 戻り値:
false
(クラスがクラスまたはメソッドレベルでキャッシュ操作メタデータを持たないことがわかっている場合)。それ以外の場合はtrue
。デフォルトの実装はtrue
を返し、通常のイントロスペクションが行われます。- 関連事項:
findCacheOperation
protected @Nullable JCacheOperation<?> findCacheOperation(MethodSE method, @Nullable ClassSE<?> targetType) クラスからコピーされた説明:AbstractFallbackJCacheOperationSource
サブクラスは、これを実装して、指定されたメソッドのキャッシュ操作を返す必要があります(存在する場合)。- 次で指定:
- クラス
AbstractFallbackJCacheOperationSource
のfindCacheOperation
- パラメーター:
method
- 操作を取得するメソッドtargetType
- ターゲットクラス- 戻り値:
- このメソッドに関連付けられたキャッシュ操作 (または、存在しない場合は
null
)
getCacheDefaults
createCacheResultOperation
createCachePutOperation
createCacheRemoveOperation
createCacheRemoveAllOperation
getCacheResolver
protected CacheResolver getCacheResolver(@Nullable javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<?> details) getExceptionCacheResolver
protected CacheResolver getExceptionCacheResolver(@Nullable javax.cache.annotation.CacheResolverFactory factory, javax.cache.annotation.CacheMethodDetails<javax.cache.annotation.CacheResult> details) determineCacheResolverFactory
determineKeyGenerator
protected KeyGenerator determineKeyGenerator(@Nullable javax.cache.annotation.CacheDefaults defaults, ClassSE<? extends javax.cache.annotation.CacheKeyGenerator> candidate) determineCacheName
generateDefaultCacheName
getBean
指定されたキャッシュ戦略type
のインスタンスを検索または作成します。- パラメーター:
type
- 管理する Bean の型- 戻り値:
- 必要な Bean
getDefaultCacheResolver
何も設定されていない場合、デフォルトのCacheResolver
を返します。getDefaultExceptionCacheResolver
何も設定されていない場合、デフォルトの例外CacheResolver
を返します。getDefaultKeyGenerator
何も設定されていない場合、デフォルトのKeyGenerator
を返します。