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 Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      Promise<java.time.Duration> delay​(java.lang.Integer attempt)
      Builds a promise wrapping a duration that will instruct the caller how long to wait between retries.
    • Method Detail

      • delay

        Promise<java.time.Duration> delay​(java.lang.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.