/** * <p> * The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater * than 100, at most 100 shards are returned. * </p> * * @param limit * The maximum number of shards to return in a single call. The default value is 100. If you specify a value * greater than 100, at most 100 shards are returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStreamRequest withLimit(Integer limit) { setLimit(limit); return this; }
DescribeStreamRequest describeStreamRequest = new DescribeStreamRequest(); describeStreamRequest.setStreamName(streamName); describeStreamRequest.setLimit(limit); describeStreamRequest.setExclusiveStartShardId(exclusiveStartShardId); return describeStream(describeStreamRequest);
/** * @param limit The maximum number of shards to return. * @return A reference to this updated object so that method calls can be chained together. */ @Override public DescribeStreamRequest withLimit(Integer limit) { internalRequest.setLimit(limit); return this; }
/** * @param limit The maximum number of shards to return. */ @Override public void setLimit(Integer limit) { internalRequest.setLimit(limit); }
/** * @param limit The maximum number of shards to return. * @return A reference to this updated object so that method calls can be chained together. */ @Override public DescribeStreamRequest withLimit(Integer limit) { internalRequest.setLimit(limit); return this; }
/** * @param limit The maximum number of shards to return. */ @Override public void setLimit(Integer limit) { internalRequest.setLimit(limit); }
/** * <p> * The maximum number of shards to return in a single call. The default value is 100. If you specify a value greater * than 100, at most 100 shards are returned. * </p> * * @param limit * The maximum number of shards to return in a single call. The default value is 100. If you specify a value * greater than 100, at most 100 shards are returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeStreamRequest withLimit(Integer limit) { setLimit(limit); return this; }
/** * @param streamName The ID of the stream to describe. * @param limit The maximum number of shards to return. * @param exclusiveStartShardId The shard ID of the shard to start with for the stream description. * @return The response from the DescribeStream service method, adapted for use with the AmazonKinesis model. */ @Override public DescribeStreamResult describeStream(String streamName, Integer limit, String exclusiveStartShardId) { DescribeStreamRequest request = new DescribeStreamRequest(); request.setStreamName(streamName); request.setLimit(limit); request.setExclusiveStartShardId(exclusiveStartShardId); return this.describeStream(request); }
/** * @param streamName The ID of the stream to describe. * @param limit The maximum number of shards to return. * @param exclusiveStartShardId The shard ID of the shard to start with for the stream description. * @return The response from the DescribeStream service method, adapted for use with the AmazonKinesis model. */ @Override public DescribeStreamResult describeStream(String streamName, Integer limit, String exclusiveStartShardId) { DescribeStreamRequest request = new DescribeStreamRequest(); request.setStreamName(streamName); request.setLimit(limit); request.setExclusiveStartShardId(exclusiveStartShardId); return this.describeStream(request); }
@Override public ImmutableSortedMap<String, ShardInfo> getShardList() { Map<String, ShardInfo> spoutShards = new HashMap<>(); DescribeStreamRequest input = new DescribeStreamRequest(); DescribeStreamResult out; input.setStreamName(streamName); input.setLimit(DESCRIBE_STREAM_LIMIT); out = getDescribeStreamResult(input); while (true) { String lastShard = addTruncatedShardList(spoutShards, out.getStreamDescription().getShards()); // If we have finished processing all the shards, we can stop looping if (!out.getStreamDescription().isHasMoreShards()) { break; } LOG.debug("There are more shards in the stream, continue paginated calls."); input.setExclusiveStartShardId(lastShard); out = getDescribeStreamResult(input); } return ImmutableSortedMap.copyOf(spoutShards, SHARD_ID_COMPARATOR); }