Interface Retry.WaitStrategy

Enclosing interface:
Retry
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 static interface Retry.WaitStrategy
Strategy used to wait before another invocation attempt.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    await(Duration delay)
    Wait before the next attempt.
  • Method Details

    • await

      boolean await(Duration delay)
      Wait before the next attempt.

      An implementation that is interrupted must restore the thread interrupt status before returning or throwing. The retry invocation then terminates with RetryOutcome.Termination.INTERRUPTED.

      Parameters:
      delay - proposed delay before the next attempt
      Returns:
      true when the requested wait completed and another attempt should be made, false to terminate retries