Package org.apache.cassandra.utils
Class Backoff.ExponentialBackoff
java.lang.Object
org.apache.cassandra.utils.Backoff.ExponentialBackoff
- All Implemented Interfaces:
Backoff
- Enclosing interface:
- Backoff
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.Backoff
Backoff.ExponentialBackoff, Backoff.None -
Constructor Summary
ConstructorsConstructorDescriptionExponentialBackoff(int maxAttempts, long baseSleepTimeMillis, long maxSleepMillis, DoubleSupplier randomSource) -
Method Summary
-
Constructor Details
-
ExponentialBackoff
public ExponentialBackoff(int maxAttempts, long baseSleepTimeMillis, long maxSleepMillis, DoubleSupplier randomSource)
-
-
Method Details
-
maxAttempts
public int maxAttempts()- Specified by:
maxAttemptsin interfaceBackoff- Returns:
- max attempts allowed,
== 0implies no retries are allowed
-
computeWaitTime
public long computeWaitTime(int retryCount) - Specified by:
computeWaitTimein interfaceBackoff
-
unit
-