use of com.amazonaws.waiters.NoOpWaiterHandler in project wildfly-camel by wildfly-extras.
the class KinesisUtils method createStream.
public static void createStream(AmazonKinesisClient client, String streamName) throws Exception {
client.createStream(streamName, 1);
Waiter<DescribeStreamRequest> waiter = client.waiters().streamExists();
DescribeStreamRequest request = new DescribeStreamRequest().withStreamName(streamName);
Assert.assertNotNull("Cannot obtain stream description", request);
Future<Void> future = waiter.runAsync(new WaiterParameters<DescribeStreamRequest>(request), new NoOpWaiterHandler());
future.get(1, TimeUnit.MINUTES);
}
use of com.amazonaws.waiters.NoOpWaiterHandler in project wildfly-camel by wildfly-extras.
the class S3Utils method createBucket.
@SuppressWarnings("unchecked")
public static void createBucket(AmazonS3Client client, String bucketName) throws Exception {
client.createBucket(bucketName);
HeadBucketRequest request = new HeadBucketRequest(bucketName);
Waiter<HeadBucketRequest> waiter = client.waiters().bucketExists();
Future<Void> future = waiter.runAsync(new WaiterParameters<HeadBucketRequest>(request), new NoOpWaiterHandler());
future.get(1, TimeUnit.MINUTES);
}
Aggregations