Class DefaultWaiter<T>

java.lang.Object
software.amazon.awssdk.core.internal.waiters.DefaultWaiter<T>
Type Parameters:
T - the type of the response expected to return from the polling function
All Implemented Interfaces:
Waiter<T>

@ThreadSafe public final class DefaultWaiter<T> extends Object implements Waiter<T>
Default implementation of the generic Waiter.
  • Method Details

    • run

      public WaiterResponse<T> run(Supplier<T> pollingFunction)
      Description copied from interface: Waiter
      It returns when the resource enters into a desired state or it is determined that the resource will never enter into the desired state.
      Specified by:
      run in interface Waiter<T>
      Parameters:
      pollingFunction - the polling function
      Returns:
      the WaiterResponse containing either a response or an exception that has matched with the waiter success condition
    • run

      public WaiterResponse<T> run(Supplier<T> pollingFunction, WaiterOverrideConfiguration overrideConfiguration)
      Description copied from interface: Waiter
      It returns when the resource enters into a desired state or it is determined that the resource will never enter into the desired state.
      Specified by:
      run in interface Waiter<T>
      Parameters:
      pollingFunction - the polling function
      overrideConfiguration - per request override configuration
      Returns:
      the WaiterResponse containing either a response or an exception that has matched with the waiter success condition
    • builder

      public static <T> Waiter.Builder<T> builder()