Class DigitalOcean2RateLimitRetryHandler
- java.lang.Object
-
- org.jclouds.http.handlers.RateLimitRetryHandler
-
- org.jclouds.digitalocean2.handlers.DigitalOcean2RateLimitRetryHandler
-
- All Implemented Interfaces:
HttpRetryHandler
@Singleton public class DigitalOcean2RateLimitRetryHandler extends RateLimitRetryHandler
-
-
Field Summary
-
Fields inherited from class org.jclouds.http.handlers.RateLimitRetryHandler
logger
-
Fields inherited from interface org.jclouds.http.HttpRetryHandler
ALWAYS_RETRY, NEVER_RETRY
-
-
Constructor Summary
Constructors Constructor Description DigitalOcean2RateLimitRetryHandler()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method 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 longmillisUntilNextAvailableRequest(long epochForNextAvailableRequest)-
Methods inherited from class org.jclouds.http.handlers.RateLimitRetryHandler
delayRequestUntilAllowed, getMaxRateLimitWait, getRetryCountLimit, rateLimitErrorStatus, shouldRetryRequest
-
-
-
-
Method Detail
-
millisToNextAvailableRequest
protected com.google.common.base.Optional<Long> millisToNextAvailableRequest(HttpCommand command, HttpResponse response)
Description copied from class:RateLimitRetryHandlerCompute the number of milliseconds that must pass until a request can be performed.- Specified by:
millisToNextAvailableRequestin classRateLimitRetryHandler- Parameters:
command- The command being executed.response- The rate-limit error response.- Returns:
- The number of milliseconds to wait for an available request, if taht information is available.
-
millisUntilNextAvailableRequest
public static long millisUntilNextAvailableRequest(long epochForNextAvailableRequest)
-
-