Class DefaultAsyncWaiter.DefaultBuilder<T>
java.lang.Object
software.amazon.awssdk.core.internal.waiters.DefaultAsyncWaiter.DefaultBuilder<T>
- All Implemented Interfaces:
AsyncWaiter.Builder<T>,WaiterBuilder<T,AsyncWaiter.Builder<T>>
- Enclosing class:
DefaultAsyncWaiter<T>
public static final class DefaultAsyncWaiter.DefaultBuilder<T>
extends Object
implements AsyncWaiter.Builder<T>
-
Method Summary
Modifier and TypeMethodDescriptionacceptors(List<WaiterAcceptor<? super T>> waiterAcceptors) Defines a list ofWaiterAcceptors to check whether an expected state has met after executing an operation.addAcceptor(WaiterAcceptor<? super T> waiterAcceptor) Adds aWaiterAcceptorto the end of the ordered waiterAcceptors list.build()An immutable object that is created from the properties that have been set on the builder.overrideConfiguration(WaiterOverrideConfiguration overrideConfiguration) Defines overrides to the default SDK waiter configuration that should be used for waiters created by this builder.scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) Defines theScheduledExecutorServiceused to schedule async polling attempts.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.core.waiters.WaiterBuilder
overrideConfiguration
-
Method Details
-
scheduledExecutorService
public AsyncWaiter.Builder<T> scheduledExecutorService(ScheduledExecutorService scheduledExecutorService) Description copied from interface:AsyncWaiter.BuilderDefines theScheduledExecutorServiceused to schedule async polling attempts.- Specified by:
scheduledExecutorServicein interfaceAsyncWaiter.Builder<T>- Parameters:
scheduledExecutorService- the schedule executor service- Returns:
- a reference to this object so that method calls can be chained together.
-
acceptors
Description copied from interface:WaiterBuilderDefines a list ofWaiterAcceptors to check whether an expected state has met after executing an operation.The SDK will iterate over the acceptors list and the first acceptor to match the result of the operation transitions the waiter to the state specified in the acceptor.
This completely overrides any WaiterAcceptor currently configured in the builder via
WaiterBuilder.addAcceptor(WaiterAcceptor)- Specified by:
acceptorsin interfaceWaiterBuilder<T,AsyncWaiter.Builder<T>> - Parameters:
waiterAcceptors- the waiter acceptors- Returns:
- a reference to this object so that method calls can be chained together.
-
overrideConfiguration
public AsyncWaiter.Builder<T> overrideConfiguration(WaiterOverrideConfiguration overrideConfiguration) Description copied from interface:WaiterBuilderDefines overrides to the default SDK waiter configuration that should be used for waiters created by this builder.- Specified by:
overrideConfigurationin interfaceWaiterBuilder<T,AsyncWaiter.Builder<T>> - Parameters:
overrideConfiguration- the override configuration- Returns:
- a reference to this object so that method calls can be chained together.
-
addAcceptor
Description copied from interface:WaiterBuilderAdds aWaiterAcceptorto the end of the ordered waiterAcceptors list.The SDK will iterate over the acceptors list and the first acceptor to match the result of the operation transitions the waiter to the state specified in the acceptor.
- Specified by:
addAcceptorin interfaceWaiterBuilder<T,AsyncWaiter.Builder<T>> - Parameters:
waiterAcceptor- the waiter acceptors- Returns:
- a reference to this object so that method calls can be chained together.
-
build
Description copied from interface:AsyncWaiter.BuilderAn immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceAsyncWaiter.Builder<T>- Returns:
- a reference to this object so that method calls can be chained together.
-