モジュール spring.retry

クラス RetryContextSupport

java.lang.ObjectSE
org.springframework.core.AttributeAccessorSupport
org.springframework.retry.context.RetryContextSupport
実装済みのインターフェース一覧:
SerializableSEorg.springframework.core.AttributeAccessorRetryContext

public class RetryContextSupport extends org.springframework.core.AttributeAccessorSupport implements RetryContext
作成者:
Dave Syer
関連事項:
  • フィールド概要

    インターフェース org.springframework.retry.RetryContext から継承されたフィールド

    CLOSED, EXHAUSTED, MAX_ATTEMPTS, NAME, NO_RECOVERY, RECOVERED, STATE_KEY
  • コンストラクター概要

    コンストラクター
    コンストラクター
    説明
  • 方法の概要

    修飾子と型
    メソッド
    説明
    現在の再試行の原因となった例外オブジェクトのアクセサー。
    再試行ブロックがネストされている場合の親コンテキストのアクセサー。
    int
    再試行回数をカウントします。
    boolean
    使い果たされたフラグ RetryContext.setExhaustedOnly() のパブリックアクセサー。
    void
    パブリックインターフェース RetryContext の例外を設定し、スロー可能オブジェクトが null 以外の場合は再試行回数を増やします。
    void
    現在の RetryCallback をこれ以上試行または再試行しないようフレームワークに通知します。

    クラス org.springframework.core.AttributeAccessorSupport から継承されたメソッド

    attributeNames, computeAttribute, copyAttributesFrom, equals, getAttribute, hasAttribute, hashCode, removeAttribute, setAttribute

    クラス java.lang.ObjectSE から継承されたメソッド

    clone, finalize, getClass, notify, notifyAll, wait, waitSE, waitSE

    インターフェース org.springframework.core.AttributeAccessor から継承されたメソッド

    attributeNames, computeAttribute, getAttribute, hasAttribute, removeAttribute, setAttribute
  • コンストラクターの詳細

    • RetryContextSupport

      public RetryContextSupport(RetryContext parent)
  • 方法の詳細

    • getParent

      public RetryContext getParent()
      インターフェースからコピーされた説明: RetryContext
      再試行ブロックがネストされている場合の親コンテキストのアクセサー。
      次で指定:
      インターフェース RetryContext 内の getParent 
      戻り値:
      親、または親がない場合は null。
    • isExhaustedOnly

      public boolean isExhaustedOnly()
      インターフェースからコピーされた説明: RetryContext
      使い果たされたフラグ RetryContext.setExhaustedOnly() のパブリックアクセサー。
      次で指定:
      インターフェース RetryContext 内の isExhaustedOnly 
      戻り値:
      フラグが設定されている場合は true。
    • setExhaustedOnly

      public void setExhaustedOnly()
      インターフェースからコピーされた説明: RetryContext
      現在の RetryCallback をこれ以上試行または再試行しないようフレームワークに通知します。
      次で指定:
      インターフェース RetryContext 内の setExhaustedOnly 
    • getRetryCount

      public int getRetryCount()
      インターフェースからコピーされた説明: RetryContext
      再試行回数をカウントします。最初の試行前はこのカウンターはゼロですが、最初の試行とそれ以降の試行前はそれに応じて増加します。
      次で指定:
      インターフェース RetryContext 内の getRetryCount 
      戻り値:
      再試行の回数。
    • getLastThrowable

      public ThrowableSE getLastThrowable()
      インターフェースからコピーされた説明: RetryContext
      現在の再試行の原因となった例外オブジェクトのアクセサー。
      次で指定:
      インターフェース RetryContext 内の getLastThrowable 
      戻り値:
      再試行を引き起こした最後の例外、または null の可能性があります。これが最初の試行であり、正常に終了した場合は null になりますが、囲むポリシーがそれを提供しないと決定した場合も null になります (たとえば、メモリ使用量に関する関心事のため)。
    • registerThrowable

      public void registerThrowable(ThrowableSE throwable)
      パブリックインターフェース RetryContext の例外を設定し、スロー可能オブジェクトが null 以外の場合は再試行回数も増やします。すべての RetryPolicy 実装は、スロー可能オブジェクトの登録時にこのメソッドを使用する必要があります。このメソッドはカウンターを増やすため、再試行ごとに 1 回だけ呼び出す必要があります。このメソッドの使用はフレームワークによって強制されるものではなく、ポリシーの作成者に対するサービスプロバイダー契約です。
      パラメーター:
      throwable - 現在の再試行が失敗する原因となった例外。
    • toString

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