Class WaiterOverrideConfiguration.Builder
- All Implemented Interfaces:
Buildable,CopyableBuilder<WaiterOverrideConfiguration.Builder,,WaiterOverrideConfiguration> SdkBuilder<WaiterOverrideConfiguration.Builder,WaiterOverrideConfiguration>
- Enclosing class:
WaiterOverrideConfiguration
-
Method Summary
Modifier and TypeMethodDescriptionbackoffStrategy(BackoffStrategy backoffStrategy) Deprecated.backoffStrategyV2(BackoffStrategy backoffStrategy) Define theBackoffStrategythat computes the delay between resource polling.build()An immutable object that is created from the properties that have been set on the builder.maxAttempts(Integer maxAttempts) Define the maximum number of attempts to try before transitioning the waiter to a failure state.waitTimeout(Duration waitTimeout) Define the amount of time to wait for the resource to transition to the desired state before timing out.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface software.amazon.awssdk.utils.builder.CopyableBuilder
copyMethods inherited from interface software.amazon.awssdk.utils.builder.SdkBuilder
applyMutation
-
Method Details
-
backoffStrategy
Deprecated.Use insteadbackoffStrategyV2(BackoffStrategy)Define theBackoffStrategythat computes the delay between resource polling. Only one ofandinvalid reference
Builder#backoffStrategy()may be defined.invalid reference
Builder#backoffStrategyV2()- Parameters:
backoffStrategy- The new backoffStrategy value.- Returns:
- This object for method chaining.
-
backoffStrategyV2
Define theBackoffStrategythat computes the delay between resource polling. Only one ofandinvalid reference
Builder#backoffStrategy()may be defined.invalid reference
Builder#backoffStrategyV2()- Parameters:
backoffStrategy- The new backoffStrategy value.- Returns:
- This object for method chaining.
-
maxAttempts
Define the maximum number of attempts to try before transitioning the waiter to a failure state.maxAttemptsworks alongsidewaitTimeout(Duration), which, when set, acts as an upper bound on the total wait time. The waiter transitions to a failure state as soon as either limit is reached.- Parameters:
maxAttempts- The new maxAttempts value.- Returns:
- This object for method chaining.
-
waitTimeout
Define the amount of time to wait for the resource to transition to the desired state before timing out. This wait timeout doesn't have strict guarantees on how quickly a request is aborted when the timeout is breached. The request can timeout early if it is determined that the next retry will breach the max wait time. It's disabled by default.When set,
waitTimeoutis an upper bound on the total wait time and works alongsidemaxAttempts(Integer), which caps the number of polling attempts (with a service-provided default). The waiter transitions to a failure state as soon as either limit is reached — the waiter may error out at the attempt limit beforewaitTimeoutelapses. For example, if a service defines a defaultmaxAttempts=100with a 6-second delay between polls, setting onlywaitTimeout(Duration.ofMinutes(30))still terminates the waiter at ~10 minutes becausemaxAttemptsis reached first.To wait longer than the service-provided default, override
maxAttempts(Integer)to increase the number of polling attempts orbackoffStrategyV2(BackoffStrategy)to lengthen the delay between polls.- Parameters:
waitTimeout- The new waitTimeout value.- Returns:
- This object for method chaining.
-
build
Description copied from interface:SdkBuilderAn immutable object that is created from the properties that have been set on the builder.- Specified by:
buildin interfaceBuildable- Specified by:
buildin interfaceSdkBuilder<WaiterOverrideConfiguration.Builder,WaiterOverrideConfiguration> - Returns:
- an instance of T
-
backoffStrategyV2(BackoffStrategy)