Class ExponentialWaitStrategy

java.lang.Object
org.apache.flink.client.program.rest.retry.ExponentialWaitStrategy
All Implemented Interfaces:
WaitStrategy

public class ExponentialWaitStrategy extends Object implements WaitStrategy
WaitStrategy with exponentially increasing sleep time.
  • Constructor Details

    • ExponentialWaitStrategy

      public ExponentialWaitStrategy(long initialWait, long maxWait)
  • Method Details

    • sleepTime

      public long sleepTime(long attempt)
      Description copied from interface: WaitStrategy
      Returns the time to wait until the next attempt. Attempts start at 0.
      Specified by:
      sleepTime in interface WaitStrategy
      Parameters:
      attempt - The number of the last attempt.
      Returns:
      Waiting time in ms.