クラス BatchRetryTemplate

java.lang.ObjectSE
org.springframework.batch.core.step.item.BatchRetryTemplate
実装されたすべてのインターフェース:
org.springframework.retry.RetryOperations

public class BatchRetryTemplate extends ObjectSE implements org.springframework.retry.RetryOperations
特に複数値のステートフル再試行を処理する特別な目的の再試行テンプレート。これは、再試行する操作が複数のアイテムで動作し、失敗した場合に、どのアイテムが原因であるかを判断する方法がない場合に役立ちます。execute メソッドで使用される RetryState はコンポジットであり、障害が発生すると、コンポジット内のすべてのキーが「同じブラシでタール化」されます。以前に失敗したキーのいずれかを使用して実行しようとすると、新しい試行が発生し、前の状態を使用して RetryPolicy がチェックされます。失敗したアイテムの 1 つが最終的に成功した場合、その試行の現在のコンポジット内の他のアイテムは(通常どおり)コンテキストキャッシュからクリアされますが、元の失敗したアイテムのエントリがキャッシュに残っている可能性があります。これは、同じバッチ内の他のアイテムが最初に致命的に失敗するため、失敗を引き起こさなかったアイテムが再試行されないことを意味する場合があります。
作成者:
Dave Syer, Mahmoud Ben Hassine
  • コンストラクターのサマリー

    コンストラクター
    コンストラクター
    説明
  • メソッドのサマリー

    修飾子と型
    メソッド
    説明
    boolean
    canRetry(org.springframework.retry.RetryContext context)
    static ListSE<org.springframework.retry.RetryState>
    static ListSE<org.springframework.retry.RetryState>
    createState(ListSE<?> keys, org.springframework.classify.Classifier<? super ThrowableSE,BooleanSE> classifier)
    final <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback)
    <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback, CollectionSE<org.springframework.retry.RetryState> states)
    final <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback)
    <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback, CollectionSE<org.springframework.retry.RetryState> states)
    final <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback, org.springframework.retry.RetryState retryState)
    final <T, E extends ThrowableSE>
    T
    execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RetryState retryState)
    void
    registerListener(org.springframework.retry.RetryListener listener)
    void
    setBackOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
    void
    setListeners(org.springframework.retry.RetryListener[] listeners)
    void
    setRetryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
    void
    setRetryPolicy(org.springframework.retry.RetryPolicy retryPolicy)

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

    clone, equalsSE, finalize, getClass, hashCode, notify, notifyAll, toString, wait, waitSE, waitSE
  • コンストラクターの詳細

    • BatchRetryTemplate

      public BatchRetryTemplate()
  • メソッドの詳細

    • execute

      public <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback, CollectionSE<org.springframework.retry.RetryState> states) throws E, ExceptionSE
      例外:
      E extends ThrowableSE
      ExceptionSE
    • execute

      public <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback, CollectionSE<org.springframework.retry.RetryState> states) throws E, ExceptionSE
      例外:
      E extends ThrowableSE
      ExceptionSE
    • execute

      public final <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback, org.springframework.retry.RetryState retryState) throws E
      次で指定:
      インターフェース org.springframework.retry.RetryOperationsexecute 
      例外:
      E extends ThrowableSE
    • execute

      public final <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RecoveryCallback<T> recoveryCallback) throws E
      次で指定:
      インターフェース org.springframework.retry.RetryOperationsexecute 
      例外:
      E extends ThrowableSE
    • execute

      public final <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback, org.springframework.retry.RetryState retryState) throws E, org.springframework.retry.ExhaustedRetryException
      次で指定:
      インターフェース org.springframework.retry.RetryOperationsexecute 
      例外:
      E extends ThrowableSE
      org.springframework.retry.ExhaustedRetryException
    • execute

      public final <T, E extends ThrowableSE> T execute(org.springframework.retry.RetryCallback<T,E> retryCallback) throws E
      次で指定:
      インターフェース org.springframework.retry.RetryOperationsexecute 
      例外:
      E extends ThrowableSE
    • createState

      public static ListSE<org.springframework.retry.RetryState> createState(ListSE<?> keys)
    • createState

      public static ListSE<org.springframework.retry.RetryState> createState(ListSE<?> keys, org.springframework.classify.Classifier<? super ThrowableSE,BooleanSE> classifier)
    • registerListener

      public void registerListener(org.springframework.retry.RetryListener listener)
    • setBackOffPolicy

      public void setBackOffPolicy(org.springframework.retry.backoff.BackOffPolicy backOffPolicy)
    • setListeners

      public void setListeners(org.springframework.retry.RetryListener[] listeners)
    • setRetryContextCache

      public void setRetryContextCache(org.springframework.retry.policy.RetryContextCache retryContextCache)
    • setRetryPolicy

      public void setRetryPolicy(org.springframework.retry.RetryPolicy retryPolicy)
    • canRetry

      public boolean canRetry(org.springframework.retry.RetryContext context)