Class Backoff.ExponentialBackoff

java.lang.Object
org.apache.cassandra.utils.Backoff.ExponentialBackoff
All Implemented Interfaces:
Backoff
Enclosing interface:
Backoff

public static class Backoff.ExponentialBackoff extends Object implements Backoff
  • Constructor Details

    • ExponentialBackoff

      public ExponentialBackoff(int maxAttempts, long baseSleepTimeMillis, long maxSleepMillis, DoubleSupplier randomSource)
  • Method Details

    • maxAttempts

      public int maxAttempts()
      Specified by:
      maxAttempts in interface Backoff
      Returns:
      max attempts allowed, == 0 implies no retries are allowed
    • computeWaitTime

      public long computeWaitTime(int retryCount)
      Specified by:
      computeWaitTime in interface Backoff
    • unit

      public TimeUnit unit()
      Specified by:
      unit in interface Backoff