public interface DataFetcher
Modifier and Type | Method and Description |
---|---|
void |
advanceIteratorTo(String sequenceNumber,
InitialPositionInStreamExtended initialPositionInStream)
Advances this KinesisDataFetcher's internal iterator to be at the passed-in sequence number.
|
software.amazon.awssdk.services.kinesis.model.GetRecordsRequest |
getGetRecordsRequest(String nextIterator)
Retrieves the next get records request based on the current iterator.
|
software.amazon.awssdk.services.kinesis.model.GetRecordsResponse |
getGetRecordsResponse(software.amazon.awssdk.services.kinesis.model.GetRecordsRequest request)
Retrieves the response based on the request.
|
String |
getNextIterator(software.amazon.awssdk.services.kinesis.model.GetShardIteratorRequest request)
Gets the next iterator based on the request.
|
DataFetcherResult |
getRecords()
Get records from the current position in the stream (up to maxRecords).
|
software.amazon.awssdk.services.kinesis.model.GetRecordsResponse |
getRecords(String nextIterator)
Gets the next set of records based on the iterator.
|
StreamIdentifier |
getStreamIdentifier()
Get the current account and stream information.
|
void |
initialize(ExtendedSequenceNumber initialCheckpoint,
InitialPositionInStreamExtended initialPositionInStream)
Initializes this KinesisDataFetcher's iterator based on the checkpointed sequence number as an
ExtendedSequenceNumber.
|
void |
initialize(String initialCheckpoint,
InitialPositionInStreamExtended initialPositionInStream)
Initializes this KinesisDataFetcher's iterator based on the checkpointed sequence number.
|
boolean |
isShardEndReached()
Checks if shardEnd is reached.
|
void |
resetIterator(String shardIterator,
String sequenceNumber,
InitialPositionInStreamExtended initialPositionInStream)
Resets the iterator by setting shardIterator, sequenceNumber and the position in the stream.
|
void |
restartIterator()
Gets a new iterator from the last known sequence number i.e.
|
DataFetcherResult getRecords()
void initialize(String initialCheckpoint, InitialPositionInStreamExtended initialPositionInStream)
initialCheckpoint
- Current checkpoint sequence number for this shard.initialPositionInStream
- The initialPositionInStream.void initialize(ExtendedSequenceNumber initialCheckpoint, InitialPositionInStreamExtended initialPositionInStream)
initialCheckpoint
- Current checkpoint sequence number for this shard.initialPositionInStream
- The initialPositionInStream.void advanceIteratorTo(String sequenceNumber, InitialPositionInStreamExtended initialPositionInStream)
sequenceNumber
- advance the iterator to the record at this sequence number.initialPositionInStream
- The initialPositionInStream.void restartIterator()
void resetIterator(String shardIterator, String sequenceNumber, InitialPositionInStreamExtended initialPositionInStream)
shardIterator
- set the current shard iterator.sequenceNumber
- reset the iterator to the record at this sequence number.initialPositionInStream
- the current position in the stream to reset the iterator to.software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getGetRecordsResponse(software.amazon.awssdk.services.kinesis.model.GetRecordsRequest request) throws Exception
request
- the current get records request used to receive a response.Exception
software.amazon.awssdk.services.kinesis.model.GetRecordsRequest getGetRecordsRequest(String nextIterator)
nextIterator
- specify the iterator to get the next record requestGetRecordsRequest
String getNextIterator(software.amazon.awssdk.services.kinesis.model.GetShardIteratorRequest request) throws ExecutionException, InterruptedException, TimeoutException
request
- used to obtain the next shard iteratorExecutionException
InterruptedException
TimeoutException
software.amazon.awssdk.services.kinesis.model.GetRecordsResponse getRecords(@NonNull String nextIterator)
nextIterator
- specified shard iterator for getting the next set of recordsGetRecordsResponse
StreamIdentifier getStreamIdentifier()
StreamIdentifier
boolean isShardEndReached()
Copyright © 2021. All rights reserved.