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

项目: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;
}
项目:components    文件:KinesisDatastoreRuntime.java   
@Override
public Iterable<ValidationResult> doHealthChecks(RuntimeContainer container) {
    AmazonKinesis amazonKinesis = KinesisClient.create(properties);
    try {
        ListStreamsResult listStreamsResult = amazonKinesis.listStreams();
        return Arrays.asList(ValidationResult.OK);
    } catch (Exception e) {
        return Arrays.asList(new ValidationResult(ValidationResult.Result.ERROR, e.getMessage()));
    }
}
项目:components    文件:KinesisDatasetRuntime.java   
@Override
public Set<String> listStreams() {
    AmazonKinesis amazonKinesis = KinesisClient.create(properties);
    ListStreamsResult listStreamsResult = amazonKinesis.listStreams();
    List<String> streamNames = listStreamsResult.getStreamNames();
    Set<String> streamNamesCollection = new HashSet(streamNames);
    while (listStreamsResult.isHasMoreStreams() && !streamNames.isEmpty()) {
        listStreamsResult = amazonKinesis.listStreams(streamNames.get(streamNames.size() - 1));
        streamNames = listStreamsResult.getStreamNames();
        streamNamesCollection.addAll(streamNames);
    }
    return streamNamesCollection;
}
项目:beam    文件:AmazonKinesisMock.java   
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) {
  throw new RuntimeException("Not implemented");
}
项目:beam    文件:AmazonKinesisMock.java   
@Override
public ListStreamsResult listStreams() {
  throw new RuntimeException("Not implemented");
}
项目:beam    文件:AmazonKinesisMock.java   
@Override
public ListStreamsResult listStreams(String exclusiveStartStreamName) {
  throw new RuntimeException("Not implemented");
}
项目:beam    文件:AmazonKinesisMock.java   
@Override
public ListStreamsResult listStreams(Integer limit, String exclusiveStartStreamName) {
  throw new RuntimeException("Not implemented");
}
项目:presto-kinesis    文件:MockKinesisClient.java   
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException
{
    return null;
}
项目:presto-kinesis    文件:MockKinesisClient.java   
@Override
public ListStreamsResult listStreams() throws AmazonServiceException, AmazonClientException
{
    return null;
}
项目:presto-kinesis    文件:MockKinesisClient.java   
@Override
public ListStreamsResult listStreams(String s) throws AmazonServiceException, AmazonClientException
{
    return null;
}
项目:presto-kinesis    文件:MockKinesisClient.java   
@Override
public ListStreamsResult listStreams(Integer integer, String s) throws AmazonServiceException, AmazonClientException
{
    return null;
}