Package io.vertx.reactivex.circuitbreaker

## Class RetryPolicy

- java.lang.Object
- - io.vertx.reactivex.circuitbreaker.RetryPolicy

- All Implemented Interfaces:
    `io.vertx.lang.rx.RxDelegate`

      public class RetryPolicy
      extends Object
      implements io.vertx.lang.rx.RxDelegate

  A policy for retry execution.

  NOTE: This class has been automatically generated from the `original` non RX-ified interface using Vert.x codegen.

- - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static io.vertx.lang.rx.TypeArg<RetryPolicy>` | `__TYPE_ARG` |

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `RetryPolicy​(RetryPolicy delegate)` |
    `RetryPolicy​(Object delegate)` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static RetryPolicy` | `constantDelay​(long delay)` | Create a constant delay retry policy.
    `long` | `delay​(Throwable failure, int retryCount)` | Compute a delay in milliseconds before retry is executed.
    `boolean` | `equals​(Object o)` |
    `static RetryPolicy` | `exponentialDelayWithJitter​(long initialDelay, long maxDelay)` | Create an exponential delay with jitter retry policy.
    `RetryPolicy` | `getDelegate()` |
    `int` | `hashCode()` |
    `static RetryPolicy` | `linearDelay​(long initialDelay, long maxDelay)` | Create a linear delay retry policy.
    `static RetryPolicy` | `newInstance​(RetryPolicy arg)` |
    `String` | `toString()` |

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### __TYPE_ARG

          public static final io.vertx.lang.rx.TypeArg<RetryPolicy> __TYPE_ARG

  - ### Constructor Detail

    - #### RetryPolicy

          public RetryPolicy​(RetryPolicy delegate)

    - #### RetryPolicy

          public RetryPolicy​(Object delegate)

  - ### Method Detail

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

    - #### equals

          public boolean equals​(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### getDelegate

          public RetryPolicy getDelegate()

      Specified by:
        `getDelegate` in interface `io.vertx.lang.rx.RxDelegate`

    - #### constantDelay

          public static RetryPolicy constantDelay​(long delay)

      Create a constant delay retry policy.
      Parameters:
        `delay` - the constant delay in milliseconds
      Returns:

    - #### linearDelay

          public static RetryPolicy linearDelay​(long initialDelay,
                                                long maxDelay)

      Create a linear delay retry policy.
      Parameters:
        `initialDelay` - the initial delay in milliseconds
        `maxDelay` - maximum delay in milliseconds
      Returns:

    - #### exponentialDelayWithJitter

          public static RetryPolicy exponentialDelayWithJitter​(long initialDelay,
                                                               long maxDelay)

      Create an exponential delay with jitter retry policy.

      Based on the Full Jitter approach described in Exponential Backoff And Jitter.

      Parameters:
        `initialDelay` - the initial delay in milliseconds
        `maxDelay` - maximum delay in milliseconds
      Returns:

    - #### delay

          public long delay​(Throwable failure,
                            int retryCount)

      Compute a delay in milliseconds before retry is executed.
      Parameters:
        `failure` - the failure of the previous execution attempt
        `retryCount` - the number of times operation has been retried already
      Returns:
        a delay in milliseconds before retry is executed

    - #### newInstance

          public static RetryPolicy newInstance​(RetryPolicy arg)