Class RetryPolicy

java.lang.Object
io.vertx.mutiny.circuitbreaker.RetryPolicy
All Implemented Interfaces:
MutinyDelegate

public class RetryPolicy extends Object implements MutinyDelegate
A policy for retry execution.

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

  • Field Details

  • Constructor Details

    • RetryPolicy

      public RetryPolicy(io.vertx.circuitbreaker.RetryPolicy delegate)
    • RetryPolicy

      public RetryPolicy(Object delegate)
  • Method Details

    • getDelegate

      public io.vertx.circuitbreaker.RetryPolicy getDelegate()
      Specified by:
      getDelegate in interface MutinyDelegate
      Returns:
      the delegate used by this Mutiny object of generated type
    • 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
    • constantDelay

      public static RetryPolicy constantDelay(long delay)
      Parameters:
      delay - the constant delay in milliseconds
      Returns:
    • linearDelay

      public static RetryPolicy linearDelay(long initialDelay, long maxDelay)
      Parameters:
      initialDelay - the initial delay in milliseconds
      maxDelay - maximum delay in milliseconds
      Returns:
    • exponentialDelayWithJitter

      public static RetryPolicy exponentialDelayWithJitter(long initialDelay, long maxDelay)
      Parameters:
      initialDelay - the initial delay in milliseconds
      maxDelay - maximum delay in milliseconds
      Returns:
    • delay

      public long delay(Throwable failure, int retryCount)
      Parameters:
      failure - the failure passed to the operation Promise
      retryCount - the number of times operation has been retried already
      Returns:
      a delay in milliseconds before retry is executed
    • newInstance

      public static RetryPolicy newInstance(io.vertx.circuitbreaker.RetryPolicy arg)