@Beta @Singleton public class AzureRateLimitRetryHandler extends RateLimitRetryHandler
The Azure ARM provider also returns this 429 HTTP status code for some errors
when resources are busy or in a state where they cannot be modified. In this
case this handler delegates to the AzureRetryableErrorHandler
to
determine if the requests can be retried.
logger
ALWAYS_RETRY, NEVER_RETRY
Modifier and Type | Method and Description |
---|---|
protected boolean |
delayRequestUntilAllowed(HttpCommand command,
HttpResponse response) |
static boolean |
isRateLimitError(HttpResponse response) |
protected com.google.common.base.Optional<Long> |
millisToNextAvailableRequest(HttpCommand command,
HttpResponse response)
Compute the number of milliseconds that must pass until a request can be
performed.
|
getMaxRateLimitWait, getRetryCountLimit, rateLimitErrorStatus, shouldRetryRequest
protected boolean delayRequestUntilAllowed(HttpCommand command, HttpResponse response)
delayRequestUntilAllowed
in class RateLimitRetryHandler
protected com.google.common.base.Optional<Long> millisToNextAvailableRequest(HttpCommand command, HttpResponse response)
RateLimitRetryHandler
millisToNextAvailableRequest
in class RateLimitRetryHandler
command
- The command being executed.response
- The rate-limit error response.public static boolean isRateLimitError(HttpResponse response)
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.