public interface RetryPolicy
Implementations of this interface implement different retry policies.
Modifier and Type | Method and Description |
---|---|
boolean |
shouldRetry(int httpResponseCode,
Exception lastException)
boolean indicating whether a failed request should be retried.
|
boolean shouldRetry(int httpResponseCode, Exception lastException)
If the retry policy requires a wait before the next try, then the shouldRetry
method should wait for
the appropriate time before responding back. i.e., there is not an explicit contract for waits, but it
is implicit in the time taken by the shouldRetry
method to return.
httpResponseCode
- the HTTP response code receivedlastException
- any exceptions encountered while processing the last requestCopyright © 2019 Microsoft Corporation. All rights reserved.