public interface RetryStrategy
RetryPolicy.| Modifier and Type | Field and Description |
|---|---|
static int |
HTTP_STATUS_TOO_MANY_REQUESTS |
| Modifier and Type | Method and Description |
|---|---|
Duration |
calculateRetryDelay(int retryAttempts)
Computes the delay between each retry.
|
int |
getMaxRetries()
Max number of retry attempts to be make.
|
default boolean |
shouldRetry(HttpResponse httpResponse)
This method is consulted to determine if a retry attempt should be made for the given
HttpResponse if the
retry attempts are less than RetryStrategy.getMaxRetries(). |
static final int HTTP_STATUS_TOO_MANY_REQUESTS
int getMaxRetries()
Duration calculateRetryDelay(int retryAttempts)
retryAttempts - The number of retry attempts completed so far.default boolean shouldRetry(HttpResponse httpResponse)
HttpResponse if the
retry attempts are less than RetryStrategy.getMaxRetries().httpResponse - The response from the previous attempt.true if another retry attempt should be made.Copyright © 2021 Microsoft Corporation. All rights reserved.