@Beta @Singleton public class OneAndOneRateLimitRetryHandler extends RateLimitRetryHandler
Modifier and Type | Field and Description |
---|---|
static String |
RETRY_AFTER_CUSTOM |
logger
ALWAYS_RETRY, NEVER_RETRY
Constructor and Description |
---|
OneAndOneRateLimitRetryHandler() |
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 secondsToNextAvailableRequest) |
delayRequestUntilAllowed, getMaxRateLimitWait, getRetryCountLimit, rateLimitErrorStatus, shouldRetryRequest
public static final String RETRY_AFTER_CUSTOM
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 secondsToNextAvailableRequest)
Copyright © 2009-2018 The Apache Software Foundation. All Rights Reserved.