Interface WaitStrategy

  • All Known Implementing Classes:
    ExponentialWaitStrategy
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public interface WaitStrategy
    Operations that are polling for a result to arrive require a waiting time between consecutive polls. A WaitStrategy determines this waiting time.
    • Method Detail

      • sleepTime

        long sleepTime​(long attempt)
        Returns the time to wait until the next attempt. Attempts start at 0.
        Parameters:
        attempt - The number of the last attempt.
        Returns:
        Waiting time in ms.