Interface Delay

  • All Known Implementing Classes:
    FixedDelay, IndexedDelay

    public interface Delay
    A strategy object to model delays between retries.
    Since:
    1.7
    See Also:
    RetryPolicy
    • Method Detail

      • delay

        Promise<Duration> delay​(Integer attempt)
        Builds a promise wrapping a duration that will instruct the caller how long to wait between retries.
        Parameters:
        attempt - current retry attempt to provide sophisticated delay strategies
        Returns:
        a promise wrapping a duration that will instruct the caller how long to wait between retries.