com.amazonaws.services.simpleworkflow.flow.interceptors

## クラス ExponentialRetryPolicy

- java.lang.Object
- - com.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase
  - - com.amazonaws.services.simpleworkflow.flow.interceptors.ExponentialRetryPolicy

- すべての実装されたインタフェース:
    RetryPolicy

      public class ExponentialRetryPolicy
      extends RetryPolicyBase

- - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `ExponentialRetryPolicy(long initialRetryIntervalSeconds)`

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `double` | `getBackoffCoefficient()`
    `long` | `getInitialRetryIntervalSeconds()`
    `int` | `getMaximumAttempts()`
    `long` | `getMaximumRetryIntervalSeconds()`
    `long` | `getRetryExpirationIntervalSeconds()`
    `long` | `nextRetryDelaySeconds(java.util.Date firstAttempt, java.util.Date recordedFailure, int numberOfTries)`
    `void` | `setBackoffCoefficient(double backoffCoefficient)` Coefficient used to calculate the next retry interval.
    `void` | `setMaximumAttempts(int maximumAttempts)` Maximum number of attempts.
    `void` | `setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)` Set the upper limit of retry interval.
    `void` | `setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)` Stop retrying after the specified interval.
    `void` | `validate()` Performs the following three validation checks for ExponentialRetry Policy: 1) initialRetryIntervalSeconds is not greater than maximumRetryIntervalSeconds 2) initialRetryIntervalSeconds is not greater than retryExpirationIntervalSeconds
    `ExponentialRetryPolicy` | `withBackoffCoefficient(double backoffCoefficient)`
    `ExponentialRetryPolicy` | `withExceptionsToExclude(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)` The exception types that should not be retried.
    `ExponentialRetryPolicy` | `withExceptionsToRetry(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)` The exception types that cause operation being retried.
    `ExponentialRetryPolicy` | `withMaximumAttempts(int maximumAttempts)`
    `ExponentialRetryPolicy` | `withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)`
    `ExponentialRetryPolicy` | `withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)`

    - ### クラスから継承されたメソッド com.amazonaws.services.simpleworkflow.flow.interceptors.RetryPolicyBase

      `getExceptionsToExclude, getExceptionsToRetry, isRetryable, setExceptionsToExclude, setExceptionsToRetry`

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

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### コンストラクタの詳細

    - #### ExponentialRetryPolicy

          public ExponentialRetryPolicy(long initialRetryIntervalSeconds)

  - ### メソッドの詳細

    - #### getInitialRetryIntervalSeconds

          public long getInitialRetryIntervalSeconds()

    - #### getMaximumRetryIntervalSeconds

          public long getMaximumRetryIntervalSeconds()

    - #### setMaximumRetryIntervalSeconds

          public void setMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)

      Set the upper limit of retry interval. No limit by default.

    - #### withMaximumRetryIntervalSeconds

          public ExponentialRetryPolicy withMaximumRetryIntervalSeconds(long maximumRetryIntervalSeconds)

    - #### getRetryExpirationIntervalSeconds

          public long getRetryExpirationIntervalSeconds()

    - #### setRetryExpirationIntervalSeconds

          public void setRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)

      Stop retrying after the specified interval.

    - #### withRetryExpirationIntervalSeconds

          public ExponentialRetryPolicy withRetryExpirationIntervalSeconds(long retryExpirationIntervalSeconds)

    - #### getBackoffCoefficient

          public double getBackoffCoefficient()

    - #### setBackoffCoefficient

          public void setBackoffCoefficient(double backoffCoefficient)

      Coefficient used to calculate the next retry interval. The following formula is used: `initialRetryIntervalSeconds * Math.pow(backoffCoefficient, numberOfTries - 2)`

    - #### withBackoffCoefficient

          public ExponentialRetryPolicy withBackoffCoefficient(double backoffCoefficient)

    - #### getMaximumAttempts

          public int getMaximumAttempts()

    - #### setMaximumAttempts

          public void setMaximumAttempts(int maximumAttempts)

      Maximum number of attempts. The first retry is second attempt.

    - #### withMaximumAttempts

          public ExponentialRetryPolicy withMaximumAttempts(int maximumAttempts)

    - #### withExceptionsToRetry

          public ExponentialRetryPolicy withExceptionsToRetry(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)

      The exception types that cause operation being retried. Subclasses of the specified types are also included. Default is Throwable.class which means retry any exceptions.
      オーバーライド:
        `withExceptionsToRetry` クラス内 `RetryPolicyBase`

    - #### withExceptionsToExclude

          public ExponentialRetryPolicy withExceptionsToExclude(java.util.Collection<java.lang.Class<? extends java.lang.Throwable>> exceptionsToRetry)

      The exception types that should not be retried. Subclasses of the specified types are also not retried. Default is empty list.
      オーバーライド:
        `withExceptionsToExclude` クラス内 `RetryPolicyBase`

    - #### nextRetryDelaySeconds

          public long nextRetryDelaySeconds(java.util.Date firstAttempt,
                                   java.util.Date recordedFailure,
                                   int numberOfTries)

      戻り値:
        Time to the next retry. `FlowConstants.NONE` means stop retrying.

    - #### validate

          public void validate()
                        throws java.lang.IllegalStateException

      Performs the following three validation checks for ExponentialRetry Policy: 1) initialRetryIntervalSeconds is not greater than maximumRetryIntervalSeconds 2) initialRetryIntervalSeconds is not greater than retryExpirationIntervalSeconds
      例外:
        `java.lang.IllegalStateException`