public final class StableTombChunk extends StableChunk
BY_BENEFIT_COST_DESCACTIVE_FNAME_SUFFIX, FNAME_SUFFIX, garbage, liveRecordCount, records, seq, SURVIVOR_FNAME_SUFFIX, SYSPROP_TOMB_CHUNK_SIZE_LIMIT, SYSPROP_VAL_CHUNK_SIZE_LIMIT, TOMB_BASEDIR, TOMB_SIZE_LIMIT_DEFAULT, VAL_BASEDIR, VAL_SIZE_LIMIT_DEFAULT| Constructor and Description |
|---|
StableTombChunk(long seq,
RecordMap records,
int liveRecordCount,
long size,
long garbage) |
| Modifier and Type | Method and Description |
|---|---|
String |
base() |
static double |
benefitToCost(long garbage,
long size)
Calculates the Benefit-Cost factor.
|
void |
disposeFilePosToKeyHandle()
Disposes the file position-to-key handle map.
|
KeyHandle |
getLiveKeyHandle(long filePos) |
int[] |
initFilePosToKeyHandle()
Initializes the file position-to-key handle map used during TombGC to look up a tombstone
at a given file position, in order to determine its liveness status.
|
void |
needsDismissing(boolean needsDismissing)
Sets whether the "dismiss prefix garbage" operation is needed for this chunk.
|
void |
retire(KeyHandle kh,
Record r,
boolean mayIncrementGarbageCount)
Retires a record in this chunk (makes it dead).
|
double |
updateBenefitToCost()
Updates the cached value of the Benefit-Cost factor.
|
cachedBenefitToCost, sizedispose, fnameSuffix, needsDismissing, retire, tombChunkSizeLimit, toString, valChunkSizeLimitpublic StableTombChunk(long seq,
RecordMap records,
int liveRecordCount,
long size,
long garbage)
public String base()
public void retire(KeyHandle kh, Record r, boolean mayIncrementGarbageCount)
Chunkpublic void needsDismissing(boolean needsDismissing)
ChunkneedsDismissing in class Chunkpublic int[] initFilePosToKeyHandle()
public KeyHandle getLiveKeyHandle(long filePos)
filePos - a file position in this tombstone chunkpublic void disposeFilePosToKeyHandle()
public double updateBenefitToCost()
public static double benefitToCost(long garbage,
long size)
garbage - amount of garbage bytes in a chunksize - total bytes in a chunkCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.