public class Socket5xxExponentialRandomBackoffPolicy extends Object implements RetryPolicy
RetryPolicy to retry on SocketTimeoutException
and http status greater or equal to 500| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_NO_RETRIES |
static int |
DEFAULT_RETRY_INTERVAL_MILLIS |
| Constructor and Description |
|---|
Socket5xxExponentialRandomBackoffPolicy() |
Socket5xxExponentialRandomBackoffPolicy(int maxNumberOfRetries,
int retryIntervalMillis) |
| Modifier and Type | Method and Description |
|---|---|
int |
getNextRetryIntervalMillis(RetryContext retryContext)
Calculates wait interval after which retry should happen in milliseconds.
|
boolean |
shouldRetry(RetryContext retryContext)
Decides whether retry should happen based on last response or last exception thrown.
|
public static final int DEFAULT_MAX_NO_RETRIES
public static final int DEFAULT_RETRY_INTERVAL_MILLIS
public Socket5xxExponentialRandomBackoffPolicy()
public Socket5xxExponentialRandomBackoffPolicy(int maxNumberOfRetries,
int retryIntervalMillis)
public boolean shouldRetry(RetryContext retryContext)
RetryPolicyshouldRetry in interface RetryPolicyretryContext - An instance of RetryContextpublic int getNextRetryIntervalMillis(RetryContext retryContext)
RetryPolicygetNextRetryIntervalMillis in interface RetryPolicyretryContext - An instance of RetryContextCopyright © 2021 HERE Europe B.V. All Rights Reserved.