public class ExponentialBackoffRetryStrategy extends Object implements RetryStrategy
RetryStrategy that retries that has an exponential backoff with a
cap.| Constructor and Description |
|---|
ExponentialBackoffRetryStrategy(int remainingRetries,
java.time.Duration currentRetryDelay,
java.time.Duration maxRetryDelay) |
| Modifier and Type | Method and Description |
|---|---|
RetryStrategy |
getNextRetryStrategy() |
int |
getNumRemainingRetries() |
java.time.Duration |
getRetryDelay() |
public ExponentialBackoffRetryStrategy(int remainingRetries,
java.time.Duration currentRetryDelay,
java.time.Duration maxRetryDelay)
remainingRetries - number of times to retrycurrentRetryDelay - the current delay between retriesmaxRetryDelay - the max delay between retriespublic int getNumRemainingRetries()
getNumRemainingRetries in interface RetryStrategypublic java.time.Duration getRetryDelay()
getRetryDelay in interface RetryStrategypublic RetryStrategy getNextRetryStrategy()
getNextRetryStrategy in interface RetryStrategyCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.