use of com.amazonaws.services.kinesis.model.ShardFilterType in project hazelcast by hazelcast.
the class RangeMonitor method listAllShardsAsync.
private Future<ListShardsResult> listAllShardsAsync(String nextToken) {
ShardFilterType filterType = ShardFilterType.FROM_TRIM_HORIZON;
// all shards within the retention period (including closed, excluding expired)
ListShardsRequest request = listAllShardsRequest(streamName, nextToken, filterType);
return kinesis.listShardsAsync(request);
}
use of com.amazonaws.services.kinesis.model.ShardFilterType in project hazelcast by hazelcast.
the class KinesisTestHelper method listOpenShards.
private List<Shard> listOpenShards() {
List<Shard> shards = new ArrayList<>();
String nextToken = null;
do {
// only the currently open shards
ShardFilterType filterType = ShardFilterType.AT_LATEST;
ListShardsRequest request = RangeMonitor.listAllShardsRequest(stream, nextToken, filterType);
ListShardsResult response = kinesis.listShards(request);
shards.addAll(response.getShards());
nextToken = response.getNextToken();
} while (nextToken != null);
return shards;
}
Aggregations