public class ShardPreparedCheckpointer extends Object implements PreparedCheckpointer
Constructor and Description |
---|
ShardPreparedCheckpointer(ExtendedSequenceNumber pendingCheckpointSequenceNumber,
RecordProcessorCheckpointer checkpointer)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
checkpoint()
This method will record a pending checkpoint.
|
ExtendedSequenceNumber |
pendingCheckpoint() |
public ShardPreparedCheckpointer(ExtendedSequenceNumber pendingCheckpointSequenceNumber, RecordProcessorCheckpointer checkpointer)
pendingCheckpointSequenceNumber
- sequence number to checkpoint atcheckpointer
- checkpointer to usepublic ExtendedSequenceNumber pendingCheckpoint()
pendingCheckpoint
in interface PreparedCheckpointer
public void checkpoint() throws KinesisClientLibDependencyException, InvalidStateException, ThrottlingException, ShutdownException, IllegalArgumentException
checkpoint
in interface PreparedCheckpointer
KinesisClientLibDependencyException
- Encountered an issue when storing the checkpoint. The application can
backoff and retry.InvalidStateException
- Can't store checkpoint.
Unable to store the checkpoint in the DynamoDB table (e.g. table doesn't exist).ThrottlingException
- Can't store checkpoint. Can be caused by checkpointing too frequently.
Consider increasing the throughput/capacity of the checkpoint store or reducing checkpoint frequency.ShutdownException
- The record processor instance has been shutdown. Another instance may have
started processing some of these records already.
The application should abort processing via this ShardRecordProcessor instance.IllegalArgumentException
- The sequence number being checkpointed is invalid because it is out of range,
i.e. it is smaller than the last check point value (prepared or committed), or larger than the greatest
sequence number seen by the associated record processor.Copyright © 2018. All rights reserved.