Class DigitalOcean2RateLimitRetryHandler

    • Constructor Detail

      • DigitalOcean2RateLimitRetryHandler

        public DigitalOcean2RateLimitRetryHandler()
    • Method Detail

      • 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)