public class DynamoDBStreamsProxy extends KinesisProxy
Modifier | Constructor and Description |
---|---|
protected |
DynamoDBStreamsProxy(Properties configProps) |
Modifier and Type | Method and Description |
---|---|
static KinesisProxyInterface |
create(Properties configProps)
Creates a DynamoDB streams proxy.
|
protected com.amazonaws.services.kinesis.AmazonKinesis |
createKinesisClient(Properties configProps)
Creates an AmazonDynamoDBStreamsAdapterClient.
|
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.
|
describeStream, getRecords, isRecoverableException, isRecoverableSdkClientException
protected DynamoDBStreamsProxy(Properties configProps)
public static KinesisProxyInterface create(Properties configProps)
configProps
- configuration propertiesprotected com.amazonaws.services.kinesis.AmazonKinesis createKinesisClient(Properties configProps)
createKinesisClient
in class KinesisProxy
configProps
- configuration propertiespublic GetShardListResult getShardList(Map<String,String> streamNamesWithLastSeenShardIds) throws InterruptedException
KinesisProxyInterface
getShardList
in interface KinesisProxyInterface
getShardList
in class KinesisProxy
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.public String getShardIterator(StreamShardHandle shard, String shardIteratorType, @Nullable Object startingMarker) throws InterruptedException
KinesisProxyInterface
KinesisProxyInterface.getRecords(String, int)
} to read data from the
Kinesis shard.getShardIterator
in interface KinesisProxyInterface
getShardIterator
in class KinesisProxy
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.Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.