Class DefaultAsyncWaiter<T>
java.lang.Object
software.amazon.awssdk.core.internal.waiters.DefaultAsyncWaiter<T>
- Type Parameters:
T- the type of the response expected to return from the polling function
- All Implemented Interfaces:
AsyncWaiter<T>
@SdkInternalApi
@ThreadSafe
public final class DefaultAsyncWaiter<T>
extends Object
implements AsyncWaiter<T>
Default implementation of the generic
AsyncWaiter.-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface software.amazon.awssdk.core.waiters.AsyncWaiter
AsyncWaiter.Builder<T> -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> AsyncWaiter.Builder<T> builder()runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction) Runs the provided polling function.runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction, WaiterOverrideConfiguration overrideConfig) Runs the provided polling function.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.waiters.AsyncWaiter
runAsync
-
Method Details
-
runAsync
public CompletableFuture<WaiterResponse<T>> runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction) Description copied from interface:AsyncWaiterRuns the provided polling function. It completes successfully when the resource enters into a desired state or exceptionally when it is determined that the resource will never enter into the desired state.- Specified by:
runAsyncin interfaceAsyncWaiter<T>- Parameters:
asyncPollingFunction- the polling function to trigger- Returns:
- A
CompletableFuturecontaining theWaiterResponse
-
runAsync
public CompletableFuture<WaiterResponse<T>> runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction, WaiterOverrideConfiguration overrideConfig) Description copied from interface:AsyncWaiterRuns the provided polling function. It completes successfully when the resource enters into a desired state or exceptionally when it is determined that the resource will never enter into the desired state.- Specified by:
runAsyncin interfaceAsyncWaiter<T>- Parameters:
asyncPollingFunction- the polling function to triggeroverrideConfig- per request override configuration- Returns:
- A
CompletableFuturecontaining theWaiterResponse
-
builder
-