クラス AbstractFallbackTransactionAttributeSource
java.lang.ObjectSE
org.springframework.transaction.interceptor.AbstractFallbackTransactionAttributeSource
- 実装されているすべてのインターフェース:
Aware
、EmbeddedValueResolverAware
、TransactionAttributeSource
- 既知の直属サブクラス
AnnotationTransactionAttributeSource
public abstract class AbstractFallbackTransactionAttributeSource
extends ObjectSE
implements TransactionAttributeSource, EmbeddedValueResolverAware
メソッドの属性をキャッシュし、フォールバックポリシーを実装する
TransactionAttributeSource
の抽象的な実装: 1. 特定のターゲットメソッド。2. ターゲットクラス。3. メソッドの宣言 ; 4. クラス / インターフェースを宣言します。ターゲットメソッドに何も関連付けられていない場合は、デフォルトでターゲットクラスのトランザクション属性が使用されます。ターゲットメソッドに関連付けられたトランザクション属性は、クラストランザクション属性を完全にオーバーライドします。ターゲットクラスに何も見つからない場合、呼び出されたメソッドが呼び出されたインターフェース(JDK プロキシの場合)がチェックされます。
- 導入:
- 1.1
- 作成者:
- Rod Johnson, Juergen Hoeller
フィールドのサマリー
フィールドコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明protected boolean
public メソッドのみにトランザクションセマンティクスを許可する必要がありますか?protected @Nullable TransactionAttribute
computeTransactionAttribute
(MethodSE method, @Nullable ClassSE<?> targetClass) getTransactionAttribute(java.lang.reflect.Method, java.lang.Class<?>)
と同じ署名ですが、結果をキャッシュしません。protected abstract @Nullable TransactionAttribute
findTransactionAttribute
(ClassSE<?> clazz) サブクラスは、特定のクラスのトランザクション属性があれば、それを返すためにこれを実装する必要があります。protected abstract @Nullable TransactionAttribute
findTransactionAttribute
(MethodSE method) サブクラスは、指定されたメソッドのトランザクション属性があればそれを返すためにこれを実装する必要があります。protected ObjectSE
getCacheKey
(MethodSE method, @Nullable ClassSE<?> targetClass) 指定されたメソッドとターゲットクラスのキャッシュキーを決定します。getTransactionAttribute
(MethodSE method, @Nullable ClassSE<?> targetClass) 指定されたメソッドのトランザクション属性を返します。メソッドが非トランザクションの場合はnull
を返します。boolean
hasTransactionAttribute
(MethodSE method, @Nullable ClassSE<?> targetClass) 指定されたメソッドにトランザクション属性があるかどうかを判断します。void
setEmbeddedValueResolver
(StringValueResolver resolver) StringValueResolver を設定して、埋め込まれた定義値の解決に使用します。クラス java.lang.ObjectSE から継承されたメソッド
clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
インターフェース org.springframework.transaction.interceptor.TransactionAttributeSource から継承されたメソッド
isCandidateClass
フィールドの詳細
logger
protected final org.apache.commons.logging.Log loggerサブクラスで利用可能なロガー。この基本クラスは Serializable としてマークされていないため、具象サブクラスが Serializable である場合、直列化後にロガーが再作成されます。
コンストラクターの詳細
AbstractFallbackTransactionAttributeSource
public AbstractFallbackTransactionAttributeSource()
メソッドの詳細
setEmbeddedValueResolver
インターフェースからコピーされた説明:EmbeddedValueResolverAware
StringValueResolver を設定して、埋め込まれた定義値の解決に使用します。- 次で指定:
- インターフェース
EmbeddedValueResolverAware
のsetEmbeddedValueResolver
hasTransactionAttribute
インターフェースからコピーされた説明:TransactionAttributeSource
指定されたメソッドにトランザクション属性があるかどうかを判断します。- 次で指定:
- インターフェース
TransactionAttributeSource
のhasTransactionAttribute
- パラメーター:
method
- イントロスペクトする方法targetClass
- ターゲットクラス (null
にすることもできます。この場合、メソッドの宣言クラスを使用する必要があります。)- 関連事項:
getTransactionAttribute
public @Nullable TransactionAttribute getTransactionAttribute(MethodSE method, @Nullable ClassSE<?> targetClass) インターフェースからコピーされた説明:TransactionAttributeSource
指定されたメソッドのトランザクション属性を返します。メソッドが非トランザクションの場合はnull
を返します。- 次で指定:
- インターフェース
TransactionAttributeSource
のgetTransactionAttribute
- パラメーター:
method
- イントロスペクトする方法targetClass
- ターゲットクラス (null
にすることもできます。この場合、メソッドの宣言クラスを使用する必要があります。)- 戻り値:
- 一致するトランザクション属性。見つからない場合は
null
getCacheKey
computeTransactionAttribute
protected @Nullable TransactionAttribute computeTransactionAttribute(MethodSE method, @Nullable ClassSE<?> targetClass) getTransactionAttribute(java.lang.reflect.Method, java.lang.Class<?>)
と同じ署名ですが、結果をキャッシュしません。getTransactionAttribute(java.lang.reflect.Method, java.lang.Class<?>)
は、このメソッドのキャッシュデコレータです。4.1.8 以降、このメソッドはオーバーライドできます。
- 導入:
- 4.1.8
- 関連事項:
findTransactionAttribute
サブクラスは、特定のクラスのトランザクション属性があれば、それを返すためにこれを実装する必要があります。- パラメーター:
clazz
- 属性を取得するクラス- 戻り値:
- このクラスに関連付けられているすべてのトランザクション属性、または存在しない場合は
null
findTransactionAttribute
サブクラスは、指定されたメソッドのトランザクション属性があればそれを返すためにこれを実装する必要があります。- パラメーター:
method
- 属性を取得するメソッド- 戻り値:
- このメソッドに関連付けられたすべてのトランザクション属性。ない場合は
null
allowPublicMethodsOnly
protected boolean allowPublicMethodsOnly()public メソッドのみにトランザクションセマンティクスを許可する必要がありますか?デフォルトの実装は
false
を返します。