アノテーションインターフェース BackOff


RetryPolicy の一部として BackOff インスタンスを作成するためのメタデータを収集します。値はそのまま指定することも、より多くの形式と式の評価をサポートする *String 相当の値を使用して指定することもできます。

使用可能な属性は次のとおりです。

導入:
4.0
作成者:
Dave Syer, Gary Russell, Aftab Shaikh, Stephane Nicoll
  • フィールドのサマリー

    フィールド
    修飾子と型
    フィールド
    説明
    static final long
    Default delay() in milliseconds.
  • オプション要素の概要

    オプション要素
    修飾子と型
    オプションの要素
    説明
    long
    最初の呼び出し後の基本遅延を指定します。
    Specify the base delay after the initial invocation using a String format.
    long
    計算された遅延に対してランダムに減算または加算される基本再試行のジッター値を指定します。結果は delay - jitter と delay + jitter の間の値になりますが、基本遅延を下回ったり最大遅延を超えたりすることはありません。
    Specify a jitter value for the base retry attempt using a String format.
    long
    再試行の最大遅延を指定し、ジッター乗数によって遅延が増加する範囲を制限します。
    Specify the maximum delay for any retry attempt using a String format.
    double
    Specify a multiplier for a delay for the next retry attempt, applied to the previous delay, starting with the initial delay as well as to the applicable jitter for each attempt.
    Specify a multiplier for a delay for the next retry attempt using a String format.
    long
    delay() のエイリアス。
  • フィールドの詳細

  • 要素の詳細

    • value

      @AliasFor("delay") long value
      delay() のエイリアス。

      他の属性が不要な場合に使用することを目的としています。例: @BackOff(2000)

      戻り値:
      the based delay in milliseconds (デフォルトの 1000L )
      デフォルト:
      1000L
    • delay

      @AliasFor("value") long delay
      最初の呼び出し後の基本遅延を指定します。

      If only a delay is specified, a FixedBackOff with that value as the interval is configured.

      乗数を指定した場合、これが乗算する初期遅延として機能します。

      デフォルトは 1000L ミリ秒です。

      戻り値:
      the based delay in milliseconds (デフォルトの 1000L )
      デフォルト:
      1000L
    • delayString

      StringSE delayString
      Specify the base delay after the initial invocation using a String format. If this is specified, takes precedence over delay() .

      The delay String can be in several formats:

      • a plain long — which is interpreted to represent a duration in milliseconds
      • any of the known DurationFormat.Style : the ISO8601 style or the SIMPLE style — using milliseconds as fallback if the string doesn't contain an explicit unit
      • Regular expressions, such as ${example.property} to use the example.property from the environment
      戻り値:
      the based delay as a String value — for example a placeholder
      関連事項:
      デフォルト:
      ""
    • maxDelay

      long maxDelay
      再試行の最大遅延を指定し、ジッター乗数によって遅延が増加する範囲を制限します。

      Ignored if only delay() is set, otherwise an ExponentialBackOff with the given max delay or an unlimited delay if not set.

      戻り値:
      the maximum delay
      デフォルト:
      0L
    • maxDelayString

      StringSE maxDelayString
      Specify the maximum delay for any retry attempt using a String format. If this is specified, takes precedence over maxDelay() ..

      The max delay String can be in several formats:

      • a plain long — which is interpreted to represent a duration in milliseconds
      • any of the known DurationFormat.Style : the ISO8601 style or the SIMPLE style — using milliseconds as fallback if the string doesn't contain an explicit unit
      • Regular expressions, such as ${example.property} to use the example.property from the environment
      戻り値:
      the max delay as a String value — for example a placeholder
      関連事項:
      デフォルト:
      ""
    • multiplier

      double multiplier
      Specify a multiplier for a delay for the next retry attempt, applied to the previous delay, starting with the initial delay as well as to the applicable jitter for each attempt.

      Ignored if only delay() is set, otherwise an ExponentialBackOff with the given multiplier or 1.0 if not set.

      戻り値:
      the value to multiply the current interval by for each attempt
      デフォルト:
      0.0
    • multiplierString

      StringSE multiplierString
      Specify a multiplier for a delay for the next retry attempt using a String format. If this is specified, takes precedence over multiplier() .

      The multiplier String can be in several formats:

      • a plain double
      • Regular expressions, such as ${example.property} to use the example.property from the environment
      戻り値:
      the value to multiply the current interval by for each attempt — for example, a placeholder
      関連事項:
      デフォルト:
      ""
    • jitter

      long jitter
      計算された遅延に対してランダムに減算または加算される基本再試行のジッター値を指定します。結果は delay - jitter と delay + jitter の間の値になりますが、基本遅延を下回ったり最大遅延を超えたりすることはありません。

      乗数を指定した場合、ジッター値にも適用されます。

      Ignored if only delay() is set, otherwise an ExponentialBackOff with the given jitter or no jitter if not set.

      戻り値:
      ジッター値(ミリ秒)
      関連事項:
      デフォルト:
      0L
    • jitterString

      StringSE jitterString
      Specify a jitter value for the base retry attempt using a String format. If this is specified, takes precedence over jitter() .

      The jitter String can be in several formats:

      • a plain long — which is interpreted to represent a duration in milliseconds
      • any of the known DurationFormat.Style : the ISO8601 style or the SIMPLE style — using milliseconds as fallback if the string doesn't contain an explicit unit
      • Regular expressions, such as ${example.property} to use the example.property from the environment
      戻り値:
      the jitter as a String value — for example, a placeholder
      関連事項:
      デフォルト:
      ""