public interface Checkpointer
Modifier and Type | Method and Description |
---|---|
ExtendedSequenceNumber |
getCheckpoint(String shardId)
Get the current checkpoint stored for the specified shard.
|
Checkpoint |
getCheckpointObject(String shardId)
Get the current checkpoint stored for the specified shard, which holds the sequence numbers for the checkpoint
and pending checkpoint.
|
String |
operation() |
void |
operation(String operation) |
void |
prepareCheckpoint(String shardId,
ExtendedSequenceNumber pendingCheckpoint,
String concurrencyToken)
Record intent to checkpoint for a shard.
|
void |
setCheckpoint(String shardId,
ExtendedSequenceNumber checkpointValue,
String concurrencyToken)
Record a checkpoint for a shard (e.g.
|
void setCheckpoint(String shardId, ExtendedSequenceNumber checkpointValue, String concurrencyToken) throws KinesisClientLibException
shardId
- Checkpoint is specified for this shard.checkpointValue
- Value of the checkpoint (e.g. Kinesis sequence number and subsequence number)concurrencyToken
- Used with conditional writes to prevent stale updates
(e.g. if there was a fail over to a different record processor, we don't want to
overwrite it's checkpoint)KinesisClientLibException
- Thrown if we were unable to save the checkpointExtendedSequenceNumber getCheckpoint(String shardId) throws KinesisClientLibException
shardId
- Current checkpoint for this shard is fetchedKinesisClientLibException
- Thrown if we are unable to fetch the checkpointCheckpoint getCheckpointObject(String shardId) throws KinesisClientLibException
shardId
- Current checkpoint for this shard is fetchedKinesisClientLibException
- Thrown if we are unable to fetch the checkpointvoid prepareCheckpoint(String shardId, ExtendedSequenceNumber pendingCheckpoint, String concurrencyToken) throws KinesisClientLibException
shardId
- Checkpoint is specified for this shard.pendingCheckpoint
- Value of the pending checkpoint (e.g. Kinesis sequence number and subsequence number)concurrencyToken
- Used with conditional writes to prevent stale updates
(e.g. if there was a fail over to a different record processor, we don't want to
overwrite it's checkpoint)KinesisClientLibException
- Thrown if we were unable to save the checkpointvoid operation(String operation)
String operation()
Copyright © 2018. All rights reserved.