com.netflix.astyanax.retry
Class ExponentialBackoff
java.lang.Object
com.netflix.astyanax.retry.SleepingRetryPolicy
com.netflix.astyanax.retry.ExponentialBackoff
- All Implemented Interfaces:
- RetryPolicy
- Direct Known Subclasses:
- BoundedExponentialBackoff
public class ExponentialBackoff
- extends SleepingRetryPolicy
Unbounded exponential backoff will sleep a random number of intervals within an
exponentially increasing number of intervals.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ExponentialBackoff
public ExponentialBackoff(long baseSleepTimeMs,
int maxAttempts)
getSleepTimeMs
public long getSleepTimeMs()
- Specified by:
getSleepTimeMs in class SleepingRetryPolicy
getBaseSleepTimeMs
public long getBaseSleepTimeMs()
duplicate
public RetryPolicy duplicate()
- Description copied from interface:
RetryPolicy
- Duplicate this policy into a fresh instance
- Returns:
toString
public java.lang.String toString()
- Overrides:
toString in class SleepingRetryPolicy