Java 类com.amazonaws.services.kinesis.model.ListStreamsRequest 实例源码

项目:sumologic-kinesis-connector    文件:KinesisUtils.java   
/**
 * Gets a list of all Amazon Kinesis streams
 * 
 * @param kinesisClient
 *        The {@link AmazonKinesisClient} with Amazon Kinesis read privileges
 * @return list of Amazon Kinesis streams
 */
public static List<String> listAllStreams(AmazonKinesisClient kinesisClient) {

    ListStreamsRequest listStreamsRequest = new ListStreamsRequest();
    listStreamsRequest.setLimit(10);
    ListStreamsResult listStreamsResult = kinesisClient.listStreams(listStreamsRequest);
    List<String> streamNames = listStreamsResult.getStreamNames();
    while (listStreamsResult.isHasMoreStreams()) {
        if (streamNames.size() > 0) {
            listStreamsRequest.setExclusiveStartStreamName(streamNames.get(streamNames.size() - 1));
        }

        listStreamsResult = kinesisClient.listStreams(listStreamsRequest);
        streamNames.addAll(listStreamsResult.getStreamNames());
    }
    return streamNames;
}
项目:aws-big-data-blog    文件:KinesisUtils.java   
/**
 * Gets a list of all Amazon Kinesis streams
 * 
 * @param kinesisClient
 *        The {@link AmazonKinesisClient} with Amazon Kinesis read privileges
 * @return list of Amazon Kinesis streams
 */
public static List<String> listAllStreams(AmazonKinesisClient kinesisClient) {

    ListStreamsRequest listStreamsRequest = new ListStreamsRequest();
    listStreamsRequest.setLimit(10);
    ListStreamsResult listStreamsResult = kinesisClient.listStreams(listStreamsRequest);
    List<String> streamNames = listStreamsResult.getStreamNames();
    while (listStreamsResult.isHasMoreStreams()) {
        if (streamNames.size() > 0) {
            listStreamsRequest.setExclusiveStartStreamName(streamNames.get(streamNames.size() - 1));
        }

        listStreamsResult = kinesisClient.listStreams(listStreamsRequest);
        streamNames.addAll(listStreamsResult.getStreamNames());
    }
    return streamNames;
}
项目:beam    文件:AmazonKinesisMock.java   
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) {
  throw new RuntimeException("Not implemented");
}
项目:presto-kinesis    文件:MockKinesisClient.java   
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException
{
    return null;
}