Class PersistentTrieMap.CompactMapNode<K,V>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieMap.AbstractMapNode<K,V>
io.usethesource.capsule.core.PersistentTrieMap.CompactMapNode<K,V>
- All Implemented Interfaces:
MapNode<K, V, PersistentTrieMap.AbstractMapNode<K,V>>, Node, Serializable
- Direct Known Subclasses:
PersistentTrieMap.CompactMixedMapNode, PersistentTrieMap.HashCollisionMapNode
- Enclosing class:
PersistentTrieMap<K,V>
protected abstract static class PersistentTrieMap.CompactMapNode<K,V>
extends PersistentTrieMap.AbstractMapNode<K,V>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final intFields inherited from class PersistentTrieMap.AbstractMapNode
TUPLE_LENGTHFields inherited from interface Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static final intbitpos(int mask) booleancontainsKey(K key, int keyHash, int shift, EqualityComparator<Object> cmp) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndInsertValue(AtomicReference<Thread> mutator, int bitpos, K key, V val) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndMigrateFromInlineToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndMigrateFromNodeToInline(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndRemoveValue(AtomicReference<Thread> mutator, int bitpos) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> copyAndSetValue(AtomicReference<Thread> mutator, int bitpos, V val) (package private) intdataIndex(int bitpos) (package private) abstract intdataMap()findByKey(K key, int keyHash, int shift, EqualityComparator<Object> cmp) (package private) abstract PersistentTrieMap.CompactMapNode<K, V> getNode(int index) (package private) static final intindex(int bitmap, int bitpos) (package private) static final intindex(int bitmap, int mask, int bitpos) (package private) static final intmask(int keyHash, int shift) (package private) static final <K,V> PersistentTrieMap.CompactMapNode <K, V> mergeTwoKeyValPairs(K key0, V val0, int keyHash0, K key1, V val1, int keyHash1, int shift) (package private) PersistentTrieMap.CompactMapNode<K, V> nodeAt(int bitpos) (package private) intnodeIndex(int bitpos) (package private) boolean(package private) abstract intnodeMap()(package private) static final <K,V> PersistentTrieMap.CompactMapNode <K, V> nodeOf(AtomicReference<Thread> mutator) (package private) static final <K,V> PersistentTrieMap.CompactMapNode <K, V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes) (package private) static final <K,V> PersistentTrieMap.CompactMapNode <K, V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, K key, V val) (package private) static byterecoverMask(int map, byte i_th) removed(AtomicReference<Thread> mutator, K key, int keyHash, int shift, MapNodeResult<K, V> details, EqualityComparator<Object> cmp) toString()updated(AtomicReference<Thread> mutator, K key, V val, int keyHash, int shift, MapNodeResult<K, V> details, EqualityComparator<Object> cmp) Methods inherited from class PersistentTrieMap.AbstractMapNode
arity, dataArray, getKey, getKeyValueEntry, getSlot, getValue, hasNodes, hasPayload, hasSlots, isAllowedToEdit, nodeArity, nodeArray, nodeIterator, payloadArity, size, slotArityMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MapNode
equivalentMethods inherited from interface Node
sizePredicate
-
Field Details
-
HASH_CODE_LENGTH
static final int HASH_CODE_LENGTH- See Also:
-
BIT_PARTITION_SIZE
static final int BIT_PARTITION_SIZE- See Also:
-
BIT_PARTITION_MASK
static final int BIT_PARTITION_MASK- See Also:
-
-
Constructor Details
-
CompactMapNode
protected CompactMapNode()
-
-
Method Details
-
mask
static final int mask(int keyHash, int shift) -
bitpos
static final int bitpos(int mask) -
nodeMap
abstract int nodeMap() -
dataMap
abstract int dataMap() -
getNode
- Specified by:
getNodein classPersistentTrieMap.AbstractMapNode<K,V>
-
nodeInvariant
boolean nodeInvariant() -
copyAndSetValue
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndSetValue(AtomicReference<Thread> mutator, int bitpos, V val) -
copyAndInsertValue
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndInsertValue(AtomicReference<Thread> mutator, int bitpos, K key, V val) -
copyAndRemoveValue
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndRemoveValue(AtomicReference<Thread> mutator, int bitpos) -
copyAndSetNode
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) -
copyAndMigrateFromInlineToNode
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndMigrateFromInlineToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) -
copyAndMigrateFromNodeToInline
abstract PersistentTrieMap.CompactMapNode<K,V> copyAndMigrateFromNodeToInline(AtomicReference<Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K, V> node) -
mergeTwoKeyValPairs
static final <K,V> PersistentTrieMap.CompactMapNode<K,V> mergeTwoKeyValPairs(K key0, V val0, int keyHash0, K key1, V val1, int keyHash1, int shift) -
nodeOf
static final <K,V> PersistentTrieMap.CompactMapNode<K,V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes) -
nodeOf
-
nodeOf
static final <K,V> PersistentTrieMap.CompactMapNode<K,V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, K key, V val) -
index
static final int index(int bitmap, int bitpos) -
index
static final int index(int bitmap, int mask, int bitpos) -
dataIndex
int dataIndex(int bitpos) -
nodeIndex
int nodeIndex(int bitpos) -
nodeAt
-
containsKey
-
findByKey
-
updated
public PersistentTrieMap.AbstractMapNode<K,V> updated(AtomicReference<Thread> mutator, K key, V val, int keyHash, int shift, MapNodeResult<K, V> details, EqualityComparator<Object> cmp) -
removed
public PersistentTrieMap.AbstractMapNode<K,V> removed(AtomicReference<Thread> mutator, K key, int keyHash, int shift, MapNodeResult<K, V> details, EqualityComparator<Object> cmp) -
recoverMask
static byte recoverMask(int map, byte i_th) - Returns:
- 0 invalid input: '<'= mask invalid input: '<'= 2^BIT_PARTITION_SIZE - 1
-
toString
-