public class LocalCheckpointTracker
extends java.lang.Object
Constructor and Description |
---|
LocalCheckpointTracker(long maxSeqNo,
long localCheckpoint)
Initialize the local checkpoint service.
|
Modifier and Type | Method and Description |
---|---|
long |
getCheckpoint()
The current checkpoint which can be advanced by
markSeqNoAsCompleted(long) . |
void |
markSeqNoAsCompleted(long seqNo)
Marks the processing of the provided sequence number as completed as updates the checkpoint if possible.
|
public LocalCheckpointTracker(long maxSeqNo, long localCheckpoint)
maxSeqNo
should be set to the last sequence number assigned, or
SequenceNumbers.NO_OPS_PERFORMED
and localCheckpoint
should be set to the last known local checkpoint,
or SequenceNumbers.NO_OPS_PERFORMED
.maxSeqNo
- the last sequence number assigned, or SequenceNumbers.NO_OPS_PERFORMED
localCheckpoint
- the last known local checkpoint, or SequenceNumbers.NO_OPS_PERFORMED
public void markSeqNoAsCompleted(long seqNo)
seqNo
- the sequence number to mark as completedpublic long getCheckpoint()
markSeqNoAsCompleted(long)
.