T - type of the Map.Entry returned by the tree.public class BinaryElasticNestedTreeMap<T extends Map.Entry> extends Object
Uses OffHeapTreeStore Red-Black-Tree as the underlying store for the segments. Each segment is stored under a segmentKey passed as Data (may be on-heap of off-heap Data). OffHeapComparator is used to compare and sort the segments according to the comparison order returned by the comparator. There is one segment per segmentKey.
Each segment uses BinaryElasticHashMap as the underlying segment storage.
Contract of each segment: - Expects the key & value to be in the NativeMemoryData, - Returns NativeMemoryData, - Never disposes any NativeMemoryData passed to it,
Each method that returns MapEntry instances uses MapEntryFactory to create them.
| Constructor and Description |
|---|
BinaryElasticNestedTreeMap(EnterpriseSerializationService ess,
com.hazelcast.internal.memory.MemoryAllocator malloc,
com.hazelcast.elastic.tree.OffHeapComparator keyComparator) |
BinaryElasticNestedTreeMap(EnterpriseSerializationService ess,
com.hazelcast.internal.memory.MemoryAllocator malloc,
com.hazelcast.elastic.tree.OffHeapComparator keyComparator,
MapEntryFactory<T> mapEntryFactory) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Clears the map by removing and disposing all segments including key/value pairs stored.
|
void |
dispose() |
Set<T> |
exceptMap(com.hazelcast.nio.serialization.Data exceptSegmentKey) |
Set<T> |
get(com.hazelcast.nio.serialization.Data segmentKey) |
NativeMemoryData |
get(com.hazelcast.nio.serialization.Data segmentKey,
NativeMemoryData key) |
Set<T> |
headMap(com.hazelcast.nio.serialization.Data toSegmentKey,
boolean inclusive) |
NativeMemoryData |
put(com.hazelcast.nio.serialization.Data segmentKey,
NativeMemoryData key,
NativeMemoryData value) |
NativeMemoryData |
remove(com.hazelcast.nio.serialization.Data segmentKey,
NativeMemoryData key) |
long |
size() |
Set<T> |
subMap(com.hazelcast.nio.serialization.Data fromSegmentKey,
boolean fromInclusive,
com.hazelcast.nio.serialization.Data toSegmentKey,
boolean toInclusive) |
Set<T> |
tailMap(com.hazelcast.nio.serialization.Data fromSegmentKey,
boolean inclusive) |
public BinaryElasticNestedTreeMap(EnterpriseSerializationService ess, com.hazelcast.internal.memory.MemoryAllocator malloc, com.hazelcast.elastic.tree.OffHeapComparator keyComparator, MapEntryFactory<T> mapEntryFactory)
public BinaryElasticNestedTreeMap(EnterpriseSerializationService ess, com.hazelcast.internal.memory.MemoryAllocator malloc, com.hazelcast.elastic.tree.OffHeapComparator keyComparator)
public NativeMemoryData put(com.hazelcast.nio.serialization.Data segmentKey, NativeMemoryData key, NativeMemoryData value)
public NativeMemoryData get(com.hazelcast.nio.serialization.Data segmentKey, NativeMemoryData key)
public NativeMemoryData remove(com.hazelcast.nio.serialization.Data segmentKey, NativeMemoryData key)
public Set<T> subMap(com.hazelcast.nio.serialization.Data fromSegmentKey, boolean fromInclusive, com.hazelcast.nio.serialization.Data toSegmentKey, boolean toInclusive)
public Set<T> tailMap(com.hazelcast.nio.serialization.Data fromSegmentKey, boolean inclusive)
public void clear()
public void dispose()
public long size()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.