Interface WaiterBuilder<T,B>
-
- All Known Subinterfaces:
AsyncWaiter.Builder<T>,Waiter.Builder<T>
- All Known Implementing Classes:
DefaultAsyncWaiter.DefaultBuilder,DefaultWaiter.DefaultBuilder
public interface WaiterBuilder<T,B>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Bacceptors(List<WaiterAcceptor<? super T>> waiterAcceptors)Defines a list ofWaiterAcceptors to check whether an expected state has met after executing an operation.BaddAcceptor(WaiterAcceptor<? super T> waiterAcceptors)Adds aWaiterAcceptorto the end of the ordered waiterAcceptors list.default BoverrideConfiguration(Consumer<WaiterOverrideConfiguration.Builder> overrideConfiguration)Defines aWaiterOverrideConfigurationto use when polling a resourceBoverrideConfiguration(WaiterOverrideConfiguration overrideConfiguration)Defines overrides to the default SDK waiter configuration that should be used for waiters created by this builder.
-
-
-
Method Detail
-
acceptors
B acceptors(List<WaiterAcceptor<? super T>> waiterAcceptors)
Defines 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
addAcceptor(WaiterAcceptor)- Parameters:
waiterAcceptors- the waiter acceptors- Returns:
- a reference to this object so that method calls can be chained together.
-
addAcceptor
B addAcceptor(WaiterAcceptor<? super T> waiterAcceptors)
Adds 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.
- Parameters:
waiterAcceptors- the waiter acceptors- Returns:
- a reference to this object so that method calls can be chained together.
-
overrideConfiguration
B overrideConfiguration(WaiterOverrideConfiguration overrideConfiguration)
Defines overrides to the default SDK waiter configuration that should be used for waiters created by this builder.- Parameters:
overrideConfiguration- the override configuration- Returns:
- a reference to this object so that method calls can be chained together.
-
overrideConfiguration
default B overrideConfiguration(Consumer<WaiterOverrideConfiguration.Builder> overrideConfiguration)
Defines aWaiterOverrideConfigurationto use when polling a resource- Parameters:
overrideConfiguration- the polling strategy to use- Returns:
- a reference to this object so that method calls can be chained together.
-
-