クラス MethodRetryEvent
java.lang.ObjectSE
java.util.EventObjectSE
org.springframework.context.ApplicationEvent
org.springframework.context.event.MethodFailureEvent
org.springframework.resilience.retry.MethodRetryEvent
- 実装されているすべてのインターフェース:
SerializableSE
再試行可能なメソッド呼び出し中に発生した例外ごとに発行されるイベント。
ApplicationListener<MethodRetryEvent>、Bean、@EventListener(MethodRetryEvent.class) メソッドを介してリッスンできます。- 導入:
- 7.0.3
- 作成者:
- Juergen Hoeller
- 関連事項:
フィールドのサマリー
クラス EventObjectSE から継承されたフィールド
sourceSEコンストラクターの概要
コンストラクターコンストラクター説明MethodRetryEvent(MethodInvocation invocation, ThrowableSE failure, boolean retryAborted) 指定された再試行可能なメソッド呼び出しに対して新しいイベントを作成します。方法の概要
修飾子と型メソッド説明発生した例外を返します。booleanReturn whether the current failure led to the retry execution getting aborted, typically indicating exhaustion, interruption or a timeout scenario.toString()クラス MethodFailureEvent から継承されたメソッド
getMethod, getSourceクラス ApplicationEvent から継承されたメソッド
getTimestamp
コンストラクターの詳細
MethodRetryEvent
指定された再試行可能なメソッド呼び出しに対して新しいイベントを作成します。- パラメーター:
invocation- the retryable method invocationfailure- 発生した例外retryAborted- whether the current failure led to the retry execution getting aborted
メソッドの詳細
getFailure
発生した例外を返します。This may be an exception thrown by the method or emitted by the reactive publisher returned from the method, or a terminal exception on retry exhaustion, interruption or timeout.
For
RetryTemplateexecutions, aninstanceof RetryExceptioncheck identifies a final exception. For Reactor pipelines,Exceptions.isRetryExhaustedidentifies an exhaustion exception, whereasinstanceof TimeoutExceptionreveals a timeout scenario.- オーバーライド:
- クラス
MethodFailureEventのgetFailure - 関連事項:
isRetryAborted
public boolean isRetryAborted()Return whether the current failure led to the retry execution getting aborted, typically indicating exhaustion, interruption or a timeout scenario.If this returns
true,getFailure()exposes the final exception thrown by the retry infrastructure (rather than thrown by the method itself).- 関連事項:
toString
- オーバーライド:
- クラス
MethodFailureEventのtoString