本文整理汇总了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;
}
示例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()));
}
}
示例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;
}
示例4: listStreams
import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) {
throw new RuntimeException("Not implemented");
}
示例5: listStreams
import com.amazonaws.services.kinesis.model.ListStreamsResult; //导入依赖的package包/类
@Override
public ListStreamsResult listStreams(ListStreamsRequest listStreamsRequest) throws AmazonServiceException, AmazonClientException
{
return null;
}