public class RetryPolicyAdapter extends Object implements RetryPolicy
RetryPolicy to the new RetryPolicy. This class is intended for internal
use by the SDK.| Constructor and Description |
|---|
RetryPolicyAdapter (RetryPolicy legacyRetryPolicy,
ClientConfiguration clientConfiguration) |
| Modifier and Type | Method and Description |
|---|---|
long |
computeDelayBeforeNextRetry (RetryPolicyContext context)
Compute the delay before the next retry request.
|
RetryPolicy.BackoffStrategy |
getBackoffStrategy () |
RetryPolicy |
getLegacyRetryPolicy () |
int |
getMaxErrorRetry () |
boolean |
isRetryable (RetryPolicyContext context) |
boolean |
maxRetriesExceeded (RetryPolicyContext context) |
boolean |
shouldRetry (RetryPolicyContext context)
Determine whether a request should or should not be retried.
|
public RetryPolicyAdapter(RetryPolicy legacyRetryPolicy, ClientConfiguration clientConfiguration)
public long computeDelayBeforeNextRetry(RetryPolicyContext context)
BackoffStrategy computeDelayBeforeNextRetry in interface BackoffStrategy context - Context about the state of the last request and information about the number of requests made.public boolean shouldRetry(RetryPolicyContext context)
RetryCondition shouldRetry in interface RetryCondition context - Context about the state of the last request and information about the number of requests made.public boolean isRetryable(RetryPolicyContext context)
public RetryPolicy getLegacyRetryPolicy()
public boolean maxRetriesExceeded(RetryPolicyContext context)
public int getMaxErrorRetry()
public RetryPolicy.BackoffStrategy getBackoffStrategy()