public class KinesisProxy extends Object implements IKinesisProxyExtended
| Modifier and Type | Field and Description |
|---|---|
static Duration |
CACHE_MAX_ALLOWED_AGE |
static int |
CACHE_MISS_WARNING_MODULUS |
static int |
MAX_CACHE_MISSES_BEFORE_RELOAD |
| Constructor and Description |
|---|
KinesisProxy(KinesisClientLibConfiguration config,
com.amazonaws.services.kinesis.AmazonKinesis client)
Public constructor.
|
KinesisProxy(String streamName,
com.amazonaws.services.kinesis.AmazonKinesis client,
long describeStreamBackoffTimeInMillis,
int maxDescribeStreamRetryAttempts,
long listShardsBackoffTimeInMillis,
int maxListShardsRetryAttempts) |
KinesisProxy(String streamName,
com.amazonaws.auth.AWSCredentialsProvider credentialProvider,
com.amazonaws.services.kinesis.AmazonKinesis kinesisClient,
long describeStreamBackoffTimeInMillis,
int maxDescribeStreamRetryAttempts,
long listShardsBackoffTimeInMillis,
int maxListShardsRetryAttempts)
Deprecated.
Deprecating constructor, this constructor doesn't use AWS best practices, moving forward please use
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release. |
KinesisProxy(String streamName,
com.amazonaws.auth.AWSCredentialsProvider credentialProvider,
String endpoint)
Deprecated.
Deprecating constructor, this constructor doesn't use AWS best practices, moving forward please use
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release. |
KinesisProxy(String streamName,
com.amazonaws.auth.AWSCredentialsProvider credentialProvider,
String endpoint,
String serviceName,
String regionId,
long describeStreamBackoffTimeInMillis,
int maxDescribeStreamRetryAttempts,
long listShardsBackoffTimeInMillis,
int maxListShardsRetryAttempts)
Deprecated.
Deprecating constructor, this constructor doesn't use AWS best practices, moving forward please use
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release. |
| Modifier and Type | Method and Description |
|---|---|
com.amazonaws.services.kinesis.model.GetRecordsResult |
get(String shardIterator,
int maxRecords)
Get records from stream.
|
Set<String> |
getAllShardIds()
Fetch the shardIds of all shards in the stream.
|
String |
getIterator(String shardId,
Date timestamp)
Fetch a shard iterator from the specified position in the shard.
|
String |
getIterator(String shardId,
String iteratorType)
Fetch a shard iterator from the specified position in the shard.
|
String |
getIterator(String shardId,
String iteratorType,
String sequenceNumber)
Fetch a shard iterator from the specified position in the shard.
|
com.amazonaws.services.kinesis.model.Shard |
getShard(String shardId)
Get the Shard corresponding to shardId associated with this
IKinesisProxy.
|
List<com.amazonaws.services.kinesis.model.Shard> |
getShardList()
Fetch all the shards defined for the stream (e.g.
|
List<com.amazonaws.services.kinesis.model.Shard> |
getShardListWithFilter(com.amazonaws.services.kinesis.model.ShardFilter shardFilter)
Fetch a subset shards defined for the stream using a filter on the ListShards API.
|
com.amazonaws.services.kinesis.model.DescribeStreamResult |
getStreamInfo(String startShardId)
Deprecated.
|
com.amazonaws.services.kinesis.model.PutRecordResult |
put(String exclusiveMinimumSequenceNumber,
String explicitHashKey,
String partitionKey,
ByteBuffer data) |
ShardClosureVerificationResponse |
verifyShardClosure(String shardId)
Used to verify during ShardConsumer shutdown if the provided shardId is for a shard that has been closed.
|
public static final int MAX_CACHE_MISSES_BEFORE_RELOAD
public static final Duration CACHE_MAX_ALLOWED_AGE
public static final int CACHE_MISS_WARNING_MODULUS
@Deprecated public KinesisProxy(String streamName, com.amazonaws.auth.AWSCredentialsProvider credentialProvider, String endpoint)
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release.streamName - Data records will be fetched from this streamcredentialProvider - Provides credentials for signing Kinesis requestsendpoint - Kinesis endpoint@Deprecated public KinesisProxy(String streamName, com.amazonaws.auth.AWSCredentialsProvider credentialProvider, String endpoint, String serviceName, String regionId, long describeStreamBackoffTimeInMillis, int maxDescribeStreamRetryAttempts, long listShardsBackoffTimeInMillis, int maxListShardsRetryAttempts)
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release.streamName - Data records will be fetched from this streamcredentialProvider - Provides credentials for signing Kinesis requestsendpoint - Kinesis endpointserviceName - service nameregionId - region iddescribeStreamBackoffTimeInMillis - Backoff time for DescribeStream calls in millisecondsmaxDescribeStreamRetryAttempts - Number of retry attempts for DescribeStream calls@Deprecated public KinesisProxy(String streamName, com.amazonaws.auth.AWSCredentialsProvider credentialProvider, com.amazonaws.services.kinesis.AmazonKinesis kinesisClient, long describeStreamBackoffTimeInMillis, int maxDescribeStreamRetryAttempts, long listShardsBackoffTimeInMillis, int maxListShardsRetryAttempts)
KinesisProxy(KinesisClientLibConfiguration, AmazonKinesis) or
KinesisProxy(String, AmazonKinesis, long, int, long, int) to create the object. Will be removed in the
next major/minor release.streamName - Data records will be fetched from this streamcredentialProvider - Provides credentials for signing Kinesis requestskinesisClient - Kinesis client (used to fetch data from Kinesis)describeStreamBackoffTimeInMillis - Backoff time for DescribeStream calls in millisecondsmaxDescribeStreamRetryAttempts - Number of retry attempts for DescribeStream callspublic KinesisProxy(KinesisClientLibConfiguration config, com.amazonaws.services.kinesis.AmazonKinesis client)
config - public KinesisProxy(String streamName, com.amazonaws.services.kinesis.AmazonKinesis client, long describeStreamBackoffTimeInMillis, int maxDescribeStreamRetryAttempts, long listShardsBackoffTimeInMillis, int maxListShardsRetryAttempts)
public com.amazonaws.services.kinesis.model.GetRecordsResult get(String shardIterator, int maxRecords) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException, com.amazonaws.services.kinesis.model.ExpiredIteratorException
get in interface IKinesisProxyshardIterator - Fetch data records using this shard iteratormaxRecords - Fetch at most this many recordscom.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream or shard was not foundcom.amazonaws.services.kinesis.model.InvalidArgumentException - Invalid input parameterscom.amazonaws.services.kinesis.model.ExpiredIteratorException - The iterator has expired@Deprecated public com.amazonaws.services.kinesis.model.DescribeStreamResult getStreamInfo(String startShardId) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.LimitExceededException
getStreamInfo in interface IKinesisProxystartShardId - exclusive start shardId - used when paginating the list of shards.com.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream was not foundcom.amazonaws.services.kinesis.model.LimitExceededExceptionpublic com.amazonaws.services.kinesis.model.Shard getShard(String shardId)
getShard in interface IKinesisProxyExtendedshardId - Fetch the Shard with this given shardIdpublic List<com.amazonaws.services.kinesis.model.Shard> getShardList()
getShardList in interface IKinesisProxypublic List<com.amazonaws.services.kinesis.model.Shard> getShardListWithFilter(com.amazonaws.services.kinesis.model.ShardFilter shardFilter)
getShardListWithFilter in interface IKinesisProxyshardFilter - currently supported filter types are AT_LATEST, AT_TRIM_HORIZON, AT_TIMESTAMP.public ShardClosureVerificationResponse verifyShardClosure(String shardId)
verifyShardClosure in interface IKinesisProxyshardId - Id of the shard that needs to be verified.public Set<String> getAllShardIds() throws com.amazonaws.services.kinesis.model.ResourceNotFoundException
getAllShardIds in interface IKinesisProxycom.amazonaws.services.kinesis.model.ResourceNotFoundException - If the specified Kinesis stream was not foundpublic String getIterator(String shardId, String iteratorType, String sequenceNumber)
getIterator in interface IKinesisProxyshardId - Shard iditeratorType - one of: TRIM_HORIZON, LATEST, AT_SEQUENCE_NUMBER, AFTER_SEQUENCE_NUMBERsequenceNumber - the sequence number - must be null unless iteratorEnum is AT_SEQUENCE_NUMBER or
AFTER_SEQUENCE_NUMBERpublic String getIterator(String shardId, String iteratorType)
getIterator in interface IKinesisProxyshardId - Shard iditeratorType - Either TRIM_HORIZON or LATEST.public String getIterator(String shardId, Date timestamp)
getIterator in interface IKinesisProxyshardId - Shard idtimestamp - The timestamp.public com.amazonaws.services.kinesis.model.PutRecordResult put(String exclusiveMinimumSequenceNumber, String explicitHashKey, String partitionKey, ByteBuffer data) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException
put in interface IKinesisProxyexclusiveMinimumSequenceNumber - (optional) used for record orderingexplicitHashKey - optionally supplied transformation of partitionkeypartitionKey - for this recorddata - payloadcom.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream was not found.com.amazonaws.services.kinesis.model.InvalidArgumentException - InvalidArgumentException.Copyright © 2021. All rights reserved.