public class WaiterImpl<Input extends AmazonWebServiceRequest,Output> extends Object implements Waiter<Input>
Constructor and Description |
---|
WaiterImpl(WaiterBuilder<Input,Output> waiterBuilder)
Constructs a new waiter with the given internal parameters
|
Modifier and Type | Method and Description |
---|---|
void |
run(WaiterParameters<Input> waiterParameters)
Polls synchronously until it is determined that the resource
transitioned into the desired state or not.
|
Future<Void> |
runAsync(WaiterParameters<Input> waiterParameters,
WaiterHandler callback)
Polls asynchronously until it is determined that the resource
transitioned into the desired state or not.
|
public WaiterImpl(WaiterBuilder<Input,Output> waiterBuilder)
waiterBuilder
- Takes in default parameters and builds a
basic waiter. Excludes request and custom
polling strategy parameters.public void run(WaiterParameters<Input> waiterParameters) throws AmazonServiceException, WaiterTimedOutException, WaiterUnrecoverableException
run
in interface Waiter<Input extends AmazonWebServiceRequest>
waiterParameters
- Custom provided parameters. Includes request and
optional custom polling strategyAmazonServiceException
- If the service exception thrown doesn't match any of the expected
exceptions, it's re-thrown.WaiterUnrecoverableException
- If the resource transitions into a failure/unexpected state.WaiterTimedOutException
- If the resource doesn't transition into the desired state
even after a certain number of retries.public Future<Void> runAsync(WaiterParameters<Input> waiterParameters, WaiterHandler callback) throws AmazonServiceException, WaiterTimedOutException, WaiterUnrecoverableException
runAsync
in interface Waiter<Input extends AmazonWebServiceRequest>
waiterParameters
- Custom provided parameters. Includes request and
optional custom polling strategycallback
- Custom callbackAmazonServiceException
WaiterTimedOutException
WaiterUnrecoverableException
Copyright © 2024. All rights reserved.