@Internal public interface KinesisProxyInterface
Modifier and Type | Method and Description |
---|---|
com.amazonaws.services.kinesis.model.GetRecordsResult |
getRecords(String shardIterator,
int maxRecordsToGet)
Get the next batch of data records using a specific shard iterator.
|
String |
getShardIterator(StreamShardHandle shard,
String shardIteratorType,
Object startingMarker)
Get a shard iterator from the specified position in a shard.
|
GetShardListResult |
getShardList(Map<String,String> streamNamesWithLastSeenShardIds)
Get shard list of multiple Kinesis streams, ignoring the
shards of each stream before a specified last seen shard id.
|
String getShardIterator(StreamShardHandle shard, String shardIteratorType, Object startingMarker) throws InterruptedException
getRecords(String, int)
}
to read data from the Kinesis shard.shard
- the shard to get the iteratorshardIteratorType
- the iterator type, defining how the shard is to be iterated
(one of: TRIM_HORIZON, LATEST, AT_TIMESTAMP, AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBER)startingMarker
- should be null
if shardIteratorType is TRIM_HORIZON or LATEST,
should be a Date
value if shardIteratorType is AT_TIMESTAMP,
should be a String
representing the sequence number if shardIteratorType is AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBERInterruptedException
- this method will retry with backoff if AWS Kinesis complains that the
operation has exceeded the rate limit; this exception will be thrown
if the backoff is interrupted.com.amazonaws.services.kinesis.model.GetRecordsResult getRecords(String shardIterator, int maxRecordsToGet) throws InterruptedException
shardIterator
- a shard iterator that encodes info about which shard to read and where to start readingmaxRecordsToGet
- the maximum amount of records to retrieve for this batchInterruptedException
- this method will retry with backoff if AWS Kinesis complains that the
operation has exceeded the rate limit; this exception will be thrown
if the backoff is interrupted.GetShardListResult getShardList(Map<String,String> streamNamesWithLastSeenShardIds) throws InterruptedException
streamNamesWithLastSeenShardIds
- a map with stream as key, and last seen shard id as valueInterruptedException
- this method will retry with backoff if AWS Kinesis complains that the
operation has exceeded the rate limit; this exception will be thrown
if the backoff is interrupted.Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.