当前位置: 首页>>代码示例>>Java>>正文


Java ListStreamsResult类代码示例

本文整理汇总了Java中com.amazonaws.services.kinesis.model.ListStreamsResult的典型用法代码示例。如果您正苦于以下问题:Java ListStreamsResult类的具体用法?Java ListStreamsResult怎么用?Java ListStreamsResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


ListStreamsResult类属于com.amazonaws.services.kinesis.model包,在下文中一共展示了ListStreamsResult类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: listAllStreams

import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:SumoLogic,项目名称:sumologic-kinesis-connector,代码行数:24,代码来源:KinesisUtils.java

示例2: doHealthChecks

import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@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()));
    }
}
 
开发者ID:Talend,项目名称:components,代码行数:11,代码来源:KinesisDatastoreRuntime.java

示例3: listStreams

import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@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;
}
 
开发者ID:Talend,项目名称:components,代码行数:14,代码来源:KinesisDatasetRuntime.java

示例4: listStreams

import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) {
  throw new RuntimeException("Not implemented");
}
 
开发者ID:apache,项目名称:beam,代码行数:5,代码来源:AmazonKinesisMock.java

示例5: listStreams

import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException
{
    return null;
}
 
开发者ID:qubole,项目名称:presto-kinesis,代码行数:6,代码来源:MockKinesisClient.java


注:本文中的com.amazonaws.services.kinesis.model.ListStreamsResult类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。