/** * Builds a InstanceStopped waiter by using custom parameters waiterParameters and other parameters defined in the * waiters specification, and then polls until it determines whether the resource entered the desired state or not, * where polling criteria is bound by either default polling strategy or custom polling strategy. */ public Waiter<DescribeInstancesRequest> instanceStopped() { return new WaiterBuilder<DescribeInstancesRequest, DescribeInstancesResult>() .withSdkFunction(new DescribeInstancesFunction(client)) .withAcceptors(new InstanceStopped.IsStoppedMatcher(), new InstanceStopped.IsBootingMatcher(), new InstanceStopped.IsPendingMatcher(), new InstanceStopped.IsRebootingMatcher(), new InstanceStopped.IsRequestedMatcher(), new InstanceStopped.IsRunning_setupMatcher(), new InstanceStopped.IsSetup_failedMatcher(), new InstanceStopped.IsStart_failedMatcher(), new InstanceStopped.IsStop_failedMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }
/** * Builds a InstanceStopped waiter by using custom parameters waiterParameters and other parameters defined in the * waiters specification, and then polls until it determines whether the resource entered the desired state or not, * where polling criteria is bound by either default polling strategy or custom polling strategy. */ public Waiter<DescribeInstancesRequest> instanceStopped() { return new WaiterBuilder<DescribeInstancesRequest, DescribeInstancesResult>() .withSdkFunction(new DescribeInstancesFunction(client)) .withAcceptors(new InstanceStopped.IsStoppedMatcher(), new InstanceStopped.IsBootingMatcher(), new InstanceStopped.IsPendingMatcher(), new InstanceStopped.IsRebootingMatcher(), new InstanceStopped.IsRequestedMatcher(), new InstanceStopped.IsRunning_setupMatcher(), new InstanceStopped.IsSetup_failedMatcher(), new InstanceStopped.IsStart_failedMatcher(), new InstanceStopped.IsStop_failedMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }