RecordMap.Cursor| Modifier and Type | Method and Description |
|---|---|
com.hazelcast.spi.hotrestart.impl.gc.record.RecordMapOffHeap.CursorOffHeap |
cursor() |
void |
dispose() |
RecordOffHeap |
get(KeyHandle kh)
Returns the record mapped by the supplied
KeyHandle, if any; otherwise
returns null. |
static RecordMapOffHeap |
newRecordMapOffHeap(com.hazelcast.internal.memory.MemoryManager memMgr,
com.hazelcast.internal.memory.MemoryManager stableMemMgr) |
static RecordMapOffHeap |
newTombstoneMapOffHeap(com.hazelcast.internal.memory.MemoryManager memMgr) |
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.
|
public static RecordMapOffHeap newRecordMapOffHeap(com.hazelcast.internal.memory.MemoryManager memMgr, com.hazelcast.internal.memory.MemoryManager stableMemMgr)
public static RecordMapOffHeap newTombstoneMapOffHeap(com.hazelcast.internal.memory.MemoryManager memMgr)
public Record putIfAbsent(long prefix, KeyHandle kh, long seq, int size, boolean isTombstone, int additionalInt)
RecordMapkh, 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.
putIfAbsent in interface RecordMapadditionalInt - for a value record, this is its garbage count;
for tombstone, it is its position in the chunk file.public RecordOffHeap get(KeyHandle kh)
RecordMapKeyHandle, 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.public int size()
public SortedBySeqRecordCursor sortedBySeqCursor(int liveRecordCount, RecordMap[] recordMaps, MutatorCatchup mc)
RecordMapsortedBySeqCursor in interface RecordMappublic com.hazelcast.spi.hotrestart.impl.gc.record.RecordMapOffHeap.CursorOffHeap cursor()
public RecordMap toStable()
RecordMappublic void dispose()
dispose in interface com.hazelcast.nio.DisposableCopyright © 2021 Hazelcast, Inc.. All Rights Reserved.