public abstract class GcHelper extends Object implements com.hazelcast.nio.Disposable
| Modifier and Type | Class and Description |
|---|---|
static class |
GcHelper.OffHeap
The GC helper specialization for off-heap Hot Restart store
|
static class |
GcHelper.OnHeap
The GC helper specialization for on-heap Hot Restart store
|
| Modifier and Type | Field and Description |
|---|---|
static int |
BITS_PER_HEX_DIGIT
A hex digit represents this many bits.
|
static int |
BUCKET_DIR_MASK
Bitmask used for the operation "modulo MAX_BUCKET_DIRS"
|
static int |
BUCKET_DIRNAME_DIGITS
The number of hex digits in the name of a bucket dir
|
static int |
CHUNK_FNAME_LENGTH
Chunk filename is a zero-padded long in hex notation.
|
static int |
MAX_BUCKET_DIRS
To optimize file access times, chunk files are distributed across
bucket directories.
|
static String |
PREFIX_TOMBSTONES_FILENAME
Name of the file that contains prefix tombstones
|
| Modifier and Type | Method and Description |
|---|---|
void |
changeSuffix(String base,
long seq,
String suffixNow,
String suffixToBe)
Changes the filename suffix of a chunk file.
|
File |
chunkFile(String base,
long seq,
String suffix,
boolean mkdirs)
Returns a
File instance representing the chunk file described by the parameters. |
long |
chunkSeq() |
void |
deleteChunkFile(long seq,
boolean isValChunk)
Deletes chunk file with the given
seq. |
void |
deleteChunkFile(StableChunk chunk)
Deletes the stable chunk file associated with the given instance of
StableChunk. |
void |
deleteChunkFiles(long[] chunkSeqs,
boolean areValChunks)
Deletes chunk files with the given
chunkSeqs. |
void |
initChunkSeq(long seq)
Initializes the chunk sequence counter to the given value.
|
WriteThroughTombChunk |
newActiveTombChunk()
Creates a new active tombstone chunk file and returns an instance of
WriteThroughTombChunk that wraps it. |
ActiveValChunk |
newActiveValChunk()
Creates a new active value chunk file and returns an instance of
ActiveValChunk that wraps it. |
abstract SetOfKeyHandle |
newSetOfKeyHandle()
Creates and returns an instance of
SetOfKeyHandle. |
SurvivorValChunk |
newSurvivorValChunk(MutatorCatchup mc)
Creates a new survivor value chunk file and returns an instance of
SurvivorValChunk that wraps it. |
abstract TrackerMap |
newTrackerMap()
Creates and returns an instance of
TrackerMap. |
long |
nextRecordSeq()
Increments the record sequence counter and returns the new value.
|
long |
recordSeq() |
File |
stableChunkFile(StableChunk chunk,
boolean mkdirs)
Returns a
File instance representing the file associated with the given stable chunk. |
public static final String PREFIX_TOMBSTONES_FILENAME
public static final int BITS_PER_HEX_DIGIT
public static final int CHUNK_FNAME_LENGTH
public static final int BUCKET_DIRNAME_DIGITS
public static final int MAX_BUCKET_DIRS
public static final int BUCKET_DIR_MASK
public ActiveValChunk newActiveValChunk()
ActiveValChunk that wraps it.public final SurvivorValChunk newSurvivorValChunk(MutatorCatchup mc)
SurvivorValChunk that wraps it.public WriteThroughTombChunk newActiveTombChunk()
WriteThroughTombChunk that wraps it.public final void initChunkSeq(long seq)
public final long chunkSeq()
public final long recordSeq()
public final long nextRecordSeq()
public void deleteChunkFile(StableChunk chunk)
StableChunk.public void deleteChunkFiles(long[] chunkSeqs,
boolean areValChunks)
chunkSeqs.chunkSeqs - the sequences of the chunks to be deletedareValChunks - if the chunk sequences are for value chunkspublic void deleteChunkFile(long seq,
boolean isValChunk)
seq.seq - the sequence of the chunk to be deletedisValChunk - if the chunk is a value chunkpublic void changeSuffix(String base, long seq, String suffixNow, String suffixToBe)
base - name of the chunk's base directory (inside the overal Hot Restart home directory).seq - chunk's seqsuffixNow - chunk file's current filename suffixsuffixToBe - desired new filename suffixpublic final File stableChunkFile(StableChunk chunk, boolean mkdirs)
File instance representing the file associated with the given stable chunk.chunk - the stable chunkmkdirs - whether to also create any missing ancestor directories of the chunk filepublic File chunkFile(String base, long seq, String suffix, boolean mkdirs)
File instance representing the chunk file described by the parameters.base - name of the chunk's base directory (inside the overal Hot Restart home directory).seq - seq of the chunksuffix - filename suffixmkdirs - whether to also create any missing ancestor directories of the chunk filepublic abstract TrackerMap newTrackerMap()
TrackerMap.public abstract SetOfKeyHandle newSetOfKeyHandle()
SetOfKeyHandle.Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.