public abstract class Chunk extends Object implements com.hazelcast.nio.Disposable
| Modifier and Type | Field and Description |
|---|---|
static String |
ACTIVE_FNAME_SUFFIX
Suffix added to the chunk file while it is active.
|
static String |
FNAME_SUFFIX
Chunk filename suffix.
|
long |
garbage
The amount of garbage in this chunk in bytes.
|
int |
liveRecordCount |
RecordMap |
records |
long |
seq
Unique sequence number of this chunk.
|
static String |
SURVIVOR_FNAME_SUFFIX
Suffix added to a chunk file while it is being written to during a GC cycle.
|
static String |
SYSPROP_TOMB_CHUNK_SIZE_LIMIT
System property that specifies the limit on the tombstone chunk file size
|
static String |
SYSPROP_VAL_CHUNK_SIZE_LIMIT
System property that specifies the limit on the value chunk file size
|
static String |
TOMB_BASEDIR
Name of the base directory for tombstone records.
|
static int |
TOMB_SIZE_LIMIT_DEFAULT
Default tombstone chunk file size limit in bytes.
|
static String |
VAL_BASEDIR
Name of the base directory for value records.
|
static int |
VAL_SIZE_LIMIT_DEFAULT
Default value chunk file size limit in bytes.
|
| Constructor and Description |
|---|
Chunk(GrowingChunk from) |
Chunk(long chunkSeq,
RecordMap records) |
Chunk(long chunkSeq,
RecordMap records,
int liveRecordCount,
long garbage) |
| Modifier and Type | Method and Description |
|---|---|
String |
base() |
void |
dispose() |
String |
fnameSuffix() |
boolean |
needsDismissing() |
void |
needsDismissing(boolean needsDismissing)
Sets whether the "dismiss prefix garbage" operation is needed for this chunk.
|
void |
retire(KeyHandle kh,
Record r) |
void |
retire(KeyHandle kh,
Record r,
boolean mayIncrementGarbageCount)
Retires a record in this chunk (makes it dead).
|
abstract long |
size() |
static int |
tombChunkSizeLimit()
Fetches the configured size limit in bytes for the tombstone chunk from the system property
"hazelcast.hotrestart.tomb.chunk.size.limit".
|
String |
toString() |
static int |
valChunkSizeLimit()
Fetches the configured size limit in bytes for the value chunk from the system property
"hazelcast.hotrestart.val.chunk.size.limit".
|
public static final String SYSPROP_VAL_CHUNK_SIZE_LIMIT
public static final String SYSPROP_TOMB_CHUNK_SIZE_LIMIT
public static final int VAL_SIZE_LIMIT_DEFAULT
public static final int TOMB_SIZE_LIMIT_DEFAULT
public static final String FNAME_SUFFIX
public static final String ACTIVE_FNAME_SUFFIX
public static final String SURVIVOR_FNAME_SUFFIX
public static final String VAL_BASEDIR
public static final String TOMB_BASEDIR
public final long seq
public final RecordMap records
public long garbage
Rebuilder if we encounter a stale record (encounter a record interred by
a prefix tombstone or a record which has a lower seq than the one we already encountered).
The value is used while calculating the benefit of GC-ing the chunk.public int liveRecordCount
public Chunk(long chunkSeq,
RecordMap records)
public Chunk(GrowingChunk from)
public Chunk(long chunkSeq,
RecordMap records,
int liveRecordCount,
long garbage)
public final boolean needsDismissing()
public void needsDismissing(boolean needsDismissing)
public abstract long size()
public void retire(KeyHandle kh, Record r, boolean mayIncrementGarbageCount)
kh - key handle of the recordr - the record to retiremayIncrementGarbageCount - whether it is appropriate to increment the garbage count for this key handlepublic String fnameSuffix()
public String base()
public void dispose()
dispose in interface com.hazelcast.nio.Disposablepublic static int valChunkSizeLimit()
public static int tombChunkSizeLimit()
Copyright © 2021 Hazelcast, Inc.. All Rights Reserved.