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>
@ThreadSafe public final class DefaultAsyncWaiter<T> extends Object implements AsyncWaiter<T>
Default implementation of the genericAsyncWaiter
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultAsyncWaiter.DefaultBuilder<T>
-
Nested classes/interfaces inherited from interface software.amazon.awssdk.core.waiters.AsyncWaiter
AsyncWaiter.Builder<T>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> AsyncWaiter.Builder<T>
builder()
CompletableFuture<WaiterResponse<T>>
runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction)
Runs the provided polling function.CompletableFuture<WaiterResponse<T>>
runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction, WaiterOverrideConfiguration overrideConfig)
Runs the provided polling function.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.core.waiters.AsyncWaiter
runAsync
-
-
-
-
Method Detail
-
runAsync
public CompletableFuture<WaiterResponse<T>> runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction)
Description copied from interface:AsyncWaiter
Runs 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:
runAsync
in interfaceAsyncWaiter<T>
- Parameters:
asyncPollingFunction
- the polling function to trigger- Returns:
- A
CompletableFuture
containing theWaiterResponse
-
runAsync
public CompletableFuture<WaiterResponse<T>> runAsync(Supplier<CompletableFuture<T>> asyncPollingFunction, WaiterOverrideConfiguration overrideConfig)
Description copied from interface:AsyncWaiter
Runs 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:
runAsync
in interfaceAsyncWaiter<T>
- Parameters:
asyncPollingFunction
- the polling function to triggeroverrideConfig
- per request override configuration- Returns:
- A
CompletableFuture
containing theWaiterResponse
-
builder
public static <T> AsyncWaiter.Builder<T> builder()
-
-