public abstract class GrowingChunk extends Chunk
ACTIVE_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| Modifier | Constructor and Description |
|---|---|
protected |
GrowingChunk(long chunkSeq,
RecordMap records) |
| Modifier and Type | Method and Description |
|---|---|
void |
addStep2(long recordSeq,
long keyPrefix,
KeyHandle kh,
int size)
Adds the record to this chunk's record map.
|
void |
addStep2(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
Called only by
Rebuilder, which encounters records out of file order. |
protected abstract int |
determineSizeLimit()
Determines the limit on the size of this chunk by reading a system property.
|
boolean |
full() |
protected void |
grow(int amount)
Updates the chunk's
size property by adding the supplied amount. |
abstract void |
insertOrUpdate(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
Inserts a new entry in the chunk's record map or updates the existing one under the same
key handle.
|
protected void |
insertOrUpdateTombstone(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
Implements
insertOrUpdate for a tombstone record. |
protected void |
insertOrUpdateValue(long recordSeq,
long keyPrefix,
KeyHandle kh,
int size)
Implements
insertOrUpdate for a value record. |
long |
size() |
base, dispose, fnameSuffix, needsDismissing, needsDismissing, retire, retire, tombChunkSizeLimit, toString, valChunkSizeLimitprotected GrowingChunk(long chunkSeq,
RecordMap records)
public final void addStep2(long recordSeq,
long keyPrefix,
KeyHandle kh,
int size)
public final void addStep2(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
Rebuilder, which encounters records out of file order. Therefore
addStep2FilePos is unusable.public abstract void insertOrUpdate(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
public final long size()
protected final void grow(int amount)
size property by adding the supplied amount.public final boolean full()
true if this chunk's size has reached (or exceeded) its size limit.protected final void insertOrUpdateValue(long recordSeq,
long keyPrefix,
KeyHandle kh,
int size)
insertOrUpdate for a value record.protected final void insertOrUpdateTombstone(long recordSeq,
long keyPrefix,
KeyHandle kh,
int filePos,
int size)
insertOrUpdate for a tombstone record.protected abstract int determineSizeLimit()
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.