/** * Builds a InstanceRegistered 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> instanceRegistered() { return new WaiterBuilder<DescribeInstancesRequest, DescribeInstancesResult>() .withSdkFunction(new DescribeInstancesFunction(client)) .withAcceptors(new InstanceRegistered.IsRegisteredMatcher(), new InstanceRegistered.IsSetup_failedMatcher(), new InstanceRegistered.IsShutting_downMatcher(), new InstanceRegistered.IsStoppedMatcher(), new InstanceRegistered.IsStoppingMatcher(), new InstanceRegistered.IsTerminatingMatcher(), new InstanceRegistered.IsTerminatedMatcher(), new InstanceRegistered.IsStop_failedMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }
/** * Builds a InstanceRegistered 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> instanceRegistered() { return new WaiterBuilder<DescribeInstancesRequest, DescribeInstancesResult>() .withSdkFunction(new DescribeInstancesFunction(client)) .withAcceptors(new InstanceRegistered.IsRegisteredMatcher(), new InstanceRegistered.IsSetup_failedMatcher(), new InstanceRegistered.IsShutting_downMatcher(), new InstanceRegistered.IsStoppedMatcher(), new InstanceRegistered.IsStoppingMatcher(), new InstanceRegistered.IsTerminatingMatcher(), new InstanceRegistered.IsTerminatedMatcher(), new InstanceRegistered.IsStop_failedMatcher()) .withDefaultPollingStrategy(new PollingStrategy(new MaxAttemptsRetryStrategy(40), new FixedDelayStrategy(15))) .withExecutorService(executorService).build(); }