クラス MethodRetryEvent

実装されているすべてのインターフェース:
SerializableSE

public class MethodRetryEvent extends MethodFailureEvent
再試行可能なメソッド呼び出し中に発生した例外ごとに発行されるイベント。ApplicationListener<MethodRetryEvent>、Bean、@EventListener(MethodRetryEvent.class) メソッドを介してリッスンできます。
導入:
7.0.3
作成者:
Juergen Hoeller
関連事項:
  • コンストラクターの詳細

    • MethodRetryEvent

      public MethodRetryEvent(MethodInvocation invocation, ThrowableSE failure, boolean retryAborted)
      指定された再試行可能なメソッド呼び出しに対して新しいイベントを作成します。
      パラメーター:
      invocation - the retryable method invocation
      failure - 発生した例外
      retryAborted - whether the current failure led to the retry execution getting aborted
  • メソッドの詳細

    • getFailure

      public ThrowableSE 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 RetryTemplate executions, an instanceof RetryException check identifies a final exception. For Reactor pipelines, Exceptions.isRetryExhausted identifies an exhaustion exception, whereas instanceof TimeoutException reveals a timeout scenario.

      オーバーライド:
      クラス MethodFailureEventgetFailure 
      関連事項:
    • 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

      public StringSE toString()
      オーバーライド:
      クラス MethodFailureEventtoString