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() |
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 CheckpointEntry |
searchCheckpointEntry(int grpId,
int part,
long partCntrSince)
Tries to search for a WAL pointer for the given partition counter start.
|
@Nullable WALPointer |
searchPartitionCounter(int grpId,
int part,
long partCntrSince)
Tries to search for a WAL pointer for the given partition counter start.
|
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 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 searchPartitionCounter(int grpId, int part, long partCntrSince)
grpId - Cache group ID.part - Partition ID.partCntrSince - Partition counter or null to search for minimal counter.null if failed to search.@Nullable public @Nullable CheckpointEntry searchCheckpointEntry(int grpId, int part, long partCntrSince)
grpId - Cache group ID.part - Partition ID.partCntrSince - Partition counter or null to search for minimal counter.null if failed to search.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.8.1 Release Date : May 21 2020