public class CheckpointHistory extends Object
CheckpointEntries.
Data is loaded from corresponding checkpoint directory.
This directory holds files for checkpoint start and end.| Constructor and Description |
|---|
CheckpointHistory(GridKernalContext ctx)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addCheckpoint(CheckpointEntry entry)
Adds checkpoint entry after the corresponding WAL record has been written to WAL.
|
Collection<Long> |
checkpoints() |
Collection<Long> |
checkpoints(boolean descending) |
CheckpointEntry |
firstCheckpoint() |
WALPointer |
firstCheckpointPointer() |
boolean |
hasSpace() |
void |
initialize(List<CheckpointEntry> checkpoints) |
CheckpointEntry |
lastCheckpoint() |
CheckpointEntry |
lastCheckpointMarkingAsInapplicable(Integer grpId)
Prepare last checkpoint in history that will marked as inapplicable.
|
List<CheckpointEntry> |
onCheckpointFinished(GridCacheDatabaseSharedManager.Checkpoint chp,
boolean truncateWal)
Logs and clears checkpoint history after checkpoint finish.
|
List<CheckpointEntry> |
onWalTruncated(WALPointer ptr)
Clears checkpoint history after WAL truncation.
|
Map<Integer,Map<Integer,CheckpointEntry>> |
searchAndReserveCheckpoints(Map<Integer,Set<Integer>> groupsAndPartitions)
Finds and reserves earliest valid checkpoint for each of given groups and partitions.
|
@Nullable Map<GroupPartitionId,CheckpointEntry> |
searchCheckpointEntry(Map<T2<Integer,Integer>,Long> searchCntrMap)
Tries to search for a WAL pointer for the given partition counter start.
|
@Nullable WALPointer |
searchEarliestWalPointer(int grpId,
Map<Integer,Long> partsCounter)
Search the earliest WAL pointer for particular group, matching by counter for partitions.
|
public CheckpointHistory(GridKernalContext ctx)
ctx - Context.public void initialize(List<CheckpointEntry> checkpoints)
checkpoints - Checkpoints.public CheckpointEntry firstCheckpoint()
null.public CheckpointEntry lastCheckpoint()
null.public WALPointer firstCheckpointPointer()
null.public Collection<Long> checkpoints(boolean descending)
public Collection<Long> checkpoints()
public void addCheckpoint(CheckpointEntry entry)
entry - Entry to add.public CheckpointEntry lastCheckpointMarkingAsInapplicable(Integer grpId)
grpId - Group id.public boolean hasSpace()
true if there is space for next checkpoint.public List<CheckpointEntry> onWalTruncated(WALPointer ptr)
public List<CheckpointEntry> onCheckpointFinished(GridCacheDatabaseSharedManager.Checkpoint chp, boolean truncateWal)
@Nullable public @Nullable WALPointer searchEarliestWalPointer(int grpId, Map<Integer,Long> partsCounter) throws IgniteCheckedException
grpId - Group id.partsCounter - Partition mapped to update counter.IgniteCheckedException@Nullable public @Nullable Map<GroupPartitionId,CheckpointEntry> searchCheckpointEntry(Map<T2<Integer,Integer>,Long> searchCntrMap)
searchCntrMap - Search map contains (Group Id, partition, counter).public Map<Integer,Map<Integer,CheckpointEntry>> searchAndReserveCheckpoints(Map<Integer,Set<Integer>> groupsAndPartitions)
groupsAndPartitions - Groups and partitions to find and reserve earliest valid checkpoint.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.9.0 Release Date : October 15 2020