Class ExponentialWaitStrategy

    • Constructor Detail

      • ExponentialWaitStrategy

        public ExponentialWaitStrategy​(long initialWait,
                                       long maxWait)
    • Method Detail

      • sleepTime

        public long sleepTime​(long attempt)
        Description copied from interface: WaitStrategy
        Returns the time to wait until the next attempt. Attempts start at 0.
        Specified by:
        sleepTime in interface WaitStrategy
        Parameters:
        attempt - The number of the last attempt.
        Returns:
        Waiting time in ms.