public class RetryWithExponentialBackOff extends RetryPolicy
| Modifier and Type | Field and Description |
|---|---|
protected int |
currentDelay |
msBeforeRetry| Constructor and Description |
|---|
RetryWithExponentialBackOff(int startMsBeforeRetry)
Constructor
|
RetryWithExponentialBackOff(int startMsBeforeRetry,
int maxRetryCount,
int maxDelay)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
getRetryTimeInMs()
Get the retry time
|
boolean |
shouldRetry(ConnectionState connectionState)
Should another retry be attempted according to the policy
|
retrypublic RetryWithExponentialBackOff(int startMsBeforeRetry)
startMsBeforeRetry - milliseconds before retrying base timepublic RetryWithExponentialBackOff(int startMsBeforeRetry,
int maxRetryCount,
int maxDelay)
startMsBeforeRetry - milliseconds before retrying base timemaxRetryCount - max retry countmaxDelay - max delay between retriespublic int getRetryTimeInMs()
RetryPolicygetRetryTimeInMs in class RetryPolicypublic boolean shouldRetry(ConnectionState connectionState)
RetryPolicyshouldRetry in class RetryPolicyconnectionState - current connection state