@Singleton public class DigitalOcean2RateLimitRetryHandler extends RateLimitRetryHandler
logger
ALWAYS_RETRY, NEVER_RETRY
Constructor and Description |
---|
DigitalOcean2RateLimitRetryHandler() |
Modifier and Type | Method and Description |
---|---|
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.
|
static long |
millisUntilNextAvailableRequest(long epochForNextAvailableRequest) |
getMaxRateLimitWait, getRetryCountLimit, rateLimitErrorStatus, shouldRetryRequest
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 long millisUntilNextAvailableRequest(long epochForNextAvailableRequest)
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.