public class MetricsCollectingKinesisProxyDecorator extends Object implements IKinesisProxy
| Constructor and Description |
|---|
MetricsCollectingKinesisProxyDecorator(String prefix,
IKinesisProxy other,
String shardId)
Constructor.
|
| 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 iteratorEnum)
Fetch a shard iterator from the specified position in the shard.
|
String |
getIterator(String shardId,
String iteratorEnum,
String sequenceNumber)
Fetch a shard iterator from the specified position in the shard.
|
List<com.amazonaws.services.kinesis.model.Shard> |
getShardList()
Fetch all the shards defined for the stream (e.g.
|
com.amazonaws.services.kinesis.model.DescribeStreamResult |
getStreamInfo(String startingShardId)
Fetch information about stream.
|
com.amazonaws.services.kinesis.model.PutRecordResult |
put(String sequenceNumberForOrdering,
String explicitHashKey,
String partitionKey,
ByteBuffer data) |
public MetricsCollectingKinesisProxyDecorator(String prefix, IKinesisProxy other, String shardId)
prefix - prefix for generated metricsother - Kinesis proxy to decorateshardId - shardId will be included in the metrics.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 expiredpublic com.amazonaws.services.kinesis.model.DescribeStreamResult getStreamInfo(String startingShardId) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException
getStreamInfo in interface IKinesisProxystartingShardId - exclusive start shardId - used when paginating the list of shards.com.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream was not foundpublic 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 iteratorEnum, String sequenceNumber) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException
getIterator in interface IKinesisProxyshardId - Shard iditeratorEnum - 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_NUMBERcom.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream or shard was not foundcom.amazonaws.services.kinesis.model.InvalidArgumentException - Invalid input parameterspublic String getIterator(String shardId, String iteratorEnum) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException
getIterator in interface IKinesisProxyshardId - Shard iditeratorEnum - Either TRIM_HORIZON or LATEST.com.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream or shard was not foundcom.amazonaws.services.kinesis.model.InvalidArgumentException - Invalid input parameterspublic String getIterator(String shardId, Date timestamp) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException
getIterator in interface IKinesisProxyshardId - Shard idtimestamp - The timestamp.com.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream or shard was not foundcom.amazonaws.services.kinesis.model.InvalidArgumentException - Invalid input parameterspublic List<com.amazonaws.services.kinesis.model.Shard> getShardList() throws com.amazonaws.services.kinesis.model.ResourceNotFoundException
getShardList in interface IKinesisProxycom.amazonaws.services.kinesis.model.ResourceNotFoundException - The Kinesis stream was not found.public com.amazonaws.services.kinesis.model.PutRecordResult put(String sequenceNumberForOrdering, String explicitHashKey, String partitionKey, ByteBuffer data) throws com.amazonaws.services.kinesis.model.ResourceNotFoundException, com.amazonaws.services.kinesis.model.InvalidArgumentException
put in interface IKinesisProxysequenceNumberForOrdering - (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 © 2016. All rights reserved.