java.lang.ObjectSE
org.springframework.retry.interceptor.RetryOperationsInterceptor
- 実装済みのインターフェース一覧:
org.aopalliance.aop.Advice、org.aopalliance.intercept.Interceptor、org.aopalliance.intercept.MethodInterceptor
public class RetryOperationsInterceptor
extends ObjectSE
implements org.aopalliance.intercept.MethodInterceptor
失敗した場合に、サービス上のメソッドへの呼び出しを自動的に再試行するために使用できる
MethodInterceptor。挿入された RetryOperations は再試行回数を制御するために使用されます。デフォルトでは、RetryTemplate のデフォルトに従って、固定回数再試行されます。トランザクション境界に関するヒント。失敗したトランザクションを再試行する場合は、トランザクション境界が再試行の範囲内にあることを確認する必要があります。そうでない場合、成功した試行はトランザクション全体とともにロールバックされます。インターセプトされるメソッドもトランザクションである場合は、アドバイス宣言の順序付けヒントを使用して、これがアドバイスチェーンのトランザクションインターセプターの前にあることを確認します。
内部の MethodInvocationRetryCallback 実装は、MethodInvocation.getMethod() の値を使用して、提供された RetryContext に " 方法 " 属性を公開します。さらに、このメソッドの引数は、Args インスタンスラッパーとして "methodArgs" 属性に公開されます。
- 作成者:
- Rob Harrop, Dave Syer, Artem Bilan
フィールド概要
フィールド修飾子と型フィールド説明static final StringSEMethodInvocation.getMethod()のRetryContext属性名。static final StringSEnew Args(invocation.getArguments())のRetryContext属性名。コンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明invoke(org.aopalliance.intercept.MethodInvocation invocation) voidvoidsetRecoverer(MethodInvocationRecoverer<?> recoverer) voidsetRetryOperations(RetryOperations retryTemplate)
フィールドの詳細
METHOD
MethodInvocation.getMethod()のRetryContext属性名。- 関連事項:
METHOD_ARGS
new Args(invocation.getArguments())のRetryContext属性名。- 関連事項:
コンストラクターの詳細
RetryOperationsInterceptor
public RetryOperationsInterceptor()
方法の詳細
setLabel
setRetryOperations
setRecoverer
invoke
- 次で指定:
- インターフェース
org.aopalliance.intercept.MethodInterceptor内のinvoke - 例外:
ThrowableSE