use of com.amazonaws.services.kinesis.model.ListShardsResult 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