public interface RecordMap
extends com.hazelcast.nio.Disposable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
RecordMap.Cursor
Cursor over record map's contents.
|
| Modifier and Type | Method and Description |
|---|---|
RecordMap.Cursor |
cursor() |
Record |
get(KeyHandle kh)
Returns the record mapped by the supplied
KeyHandle, if any; otherwise
returns null. |
Record |
putIfAbsent(long prefix,
KeyHandle kh,
long seq,
int size,
boolean isTombstone,
int additionalInt)
If there is no current mapping for
kh, establishes a mapping from
kh to a record defined by (seq, size, isTombstone, additionalInt)
and returns null. |
int |
size() |
SortedBySeqRecordCursor |
sortedBySeqCursor(int liveRecordCount,
RecordMap[] recordMaps,
MutatorCatchup mc)
Creates a sorted-by-seq cursor over all live records in the provided record maps.
|
RecordMap |
toStable()
Special-purpose method supporting an off-heap memory optimization where during GC the growing chunk's
record map is stored using an auxiliary memory allocator that allocates from a different pool than
the main one, thus reducing the peak memory demand on the main allocator.
|
Record putIfAbsent(long prefix, KeyHandle kh, long seq, int size, boolean isTombstone, int additionalInt)
kh, establishes a mapping from
kh to a record defined by (seq, size, isTombstone, additionalInt)
and returns null. If a mapping already exists, returns the existing
record without updating it.
Warning! The returned instance is valid only up to the next update operation on this map. The caller should generally not retain it.
additionalInt - for a value record, this is its garbage count;
for tombstone, it is its position in the chunk file.Record get(KeyHandle kh)
KeyHandle, if any; otherwise
returns null.
Warning! The returned instance is valid only up to the next operation
on this map, including another get. The caller should generally not retain it.int size()
SortedBySeqRecordCursor sortedBySeqCursor(int liveRecordCount, RecordMap[] recordMaps, MutatorCatchup mc)
RecordMap.Cursor cursor()
RecordMap toStable()
StableChunk.Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.