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 ofWaiterAcceptor
s to check whether an expected state has met after executing an operation.addAcceptor
(WaiterAcceptor<? super T> waiterAcceptor) Adds aWaiterAcceptor
to 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 theScheduledExecutorService
used to schedule async polling attempts.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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.Builder
Defines theScheduledExecutorService
used to schedule async polling attempts.- Specified by:
scheduledExecutorService
in 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:WaiterBuilder
Defines a list ofWaiterAcceptor
s 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:
acceptors
in 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:WaiterBuilder
Defines overrides to the default SDK waiter configuration that should be used for waiters created by this builder.- Specified by:
overrideConfiguration
in 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:WaiterBuilder
Adds aWaiterAcceptor
to 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:
addAcceptor
in 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.Builder
An immutable object that is created from the properties that have been set on the builder.- Specified by:
build
in interfaceAsyncWaiter.Builder<T>
- Returns:
- a reference to this object so that method calls can be chained together.
-