public abstract class Tracker extends Object
The global garbage count is the number of all garbage records with the given key handle still present in value chunks, excluding those records which are known to be interred by a prefix tombstone. This count reaching zero means that, if the currently live record is a tombstone, it can be declared garbage since there are no more records left that it must protect from resurrection.
| Constructor and Description |
|---|
Tracker() |
| Modifier and Type | Method and Description |
|---|---|
long |
chunkSeq() |
abstract long |
garbageCount() |
void |
incrementGarbageCount()
Increments the global garbage count for this tracker.
|
boolean |
isAlive() |
boolean |
isTombstone() |
void |
moveToChunk(long destChunkSeq)
Makes this tracker point to a new chunk seq as the location of the live record.
|
void |
newLiveRecord(long chunkSeq,
boolean freshIsTombstone,
TrackerMap owner,
boolean restarting)
Signals that a new live record with this tracker's key handle for has entered the system.
|
boolean |
reduceGarbageCount(int amount)
Reduces the global garbage count for this tracker by the specified amount.
|
void |
retire(TrackerMap owner)
Signals that the live record that this tracker points to was retired.
|
public final boolean isAlive()
public final long chunkSeq()
public final boolean isTombstone()
public final void moveToChunk(long destChunkSeq)
destChunkSeq - seq of the chunk holding the live recordpublic final void newLiveRecord(long chunkSeq,
boolean freshIsTombstone,
TrackerMap owner,
boolean restarting)
chunkSeq - seq of the chunk where the record was writtenfreshIsTombstone - whether the new record is a tombstoneowner - the TrackerMap owning this tracker (needed to notify its callback)restarting - whether this is called during Hot Restart, used only for an assertionpublic final void retire(TrackerMap owner)
owner - the TrackerMap owning this tracker (needed to notify its callback)public final void incrementGarbageCount()
public final boolean reduceGarbageCount(int amount)
public abstract long garbageCount()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.