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
  • Constructor Details

    • DigitalOcean2RateLimitRetryHandler

      public DigitalOcean2RateLimitRetryHandler()
  • Method Details

    • millisToNextAvailableRequest

      protected com.google.common.base.Optional<Long> millisToNextAvailableRequest(HttpCommand command, HttpResponse response)
      Description copied from class: RateLimitRetryHandler
      Compute the number of milliseconds that must pass until a request can be performed.
      Specified by:
      millisToNextAvailableRequest in class RateLimitRetryHandler
      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)