public Waiter<GetObjectMetadataRequest> objectNotExists() {

        return new WaiterBuilder<GetObjectMetadataRequest, ObjectMetadata>()
            .withSdkFunction(new HeadObjectFunction(client))
            .withAcceptors(
                new HttpFailureStatusAcceptor<ObjectMetadata>(404, WaiterState.SUCCESS))
            .withDefaultPollingStrategy(
                new PollingStrategy(new MaxAttemptsRetryStrategy(20),
                                    new FixedDelayStrategy(5)))
            .withExecutorService(executorService).build();
    }
Builds a ObjectNotExists 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.
aws-java-sdk-s3/src/main/java/com/amazonaws/services/s3/waiters/AmazonS3Waiters.java