Package org.apache.cassandra.utils
Class Backoff.ExponentialBackoff
- java.lang.Object
-
- org.apache.cassandra.utils.Backoff.ExponentialBackoff
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.cassandra.utils.Backoff
Backoff.ExponentialBackoff, Backoff.None
-
-
Constructor Summary
Constructors Constructor Description ExponentialBackoff(int maxAttempts, long baseSleepTimeMillis, long maxSleepMillis, java.util.function.DoubleSupplier randomSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
computeWaitTime(int retryCount)
int
maxAttempts()
java.util.concurrent.TimeUnit
unit()
-
-
-
Method Detail
-
maxAttempts
public int maxAttempts()
- Specified by:
maxAttempts
in interfaceBackoff
- Returns:
- max attempts allowed,
== 0
implies no retries are allowed
-
computeWaitTime
public long computeWaitTime(int retryCount)
- Specified by:
computeWaitTime
in interfaceBackoff
-
-