Package io.usethesource.capsule.core
Class PersistentTrieMap.BitmapIndexedMapNode<K,V>
- java.lang.Object
-
- io.usethesource.capsule.core.PersistentTrieMap.AbstractMapNode<K,V>
-
- io.usethesource.capsule.core.PersistentTrieMap.CompactMapNode<K,V>
-
- io.usethesource.capsule.core.PersistentTrieMap.CompactMixedMapNode<K,V>
-
- io.usethesource.capsule.core.PersistentTrieMap.BitmapIndexedMapNode<K,V>
-
- All Implemented Interfaces:
MapNode<K,V,PersistentTrieMap.AbstractMapNode<K,V>>,Node,java.io.Serializable
- Enclosing class:
- PersistentTrieMap<K,V>
private static final class PersistentTrieMap.BitmapIndexedMapNode<K,V> extends PersistentTrieMap.CompactMixedMapNode<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.atomic.AtomicReference<java.lang.Thread>mutator(package private) java.lang.Object[]nodes-
Fields inherited from class io.usethesource.capsule.core.PersistentTrieMap.CompactMapNode
BIT_PARTITION_MASK, BIT_PARTITION_SIZE, HASH_CODE_LENGTH
-
Fields inherited from class io.usethesource.capsule.core.PersistentTrieMap.AbstractMapNode
TUPLE_LENGTH
-
Fields inherited from interface io.usethesource.capsule.core.trie.Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE
-
-
Constructor Summary
Constructors Modifier Constructor Description privateBitmapIndexedMapNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int nodeMap, int dataMap, java.lang.Object[] nodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) PersistentTrieMap.CompactMapNode<K,V>copyAndInsertValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)(package private) PersistentTrieMap.CompactMapNode<K,V>copyAndMigrateFromInlineToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)(package private) PersistentTrieMap.CompactMapNode<K,V>copyAndMigrateFromNodeToInline(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)(package private) PersistentTrieMap.CompactMapNode<K,V>copyAndRemoveValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)(package private) PersistentTrieMap.CompactMapNode<K,V>copyAndSetNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)(package private) PersistentTrieMap.CompactMapNode<K,V>copyAndSetValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, V val)private booleandeepContentEquality(java.lang.Object[] a1, java.lang.Object[] a2, int splitAt, int length, EqualityComparator<java.lang.Object> cmp)booleanequals(java.lang.Object other)booleanequivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)(package private) KgetKey(int index)(package private) java.util.Map.Entry<K,V>getKeyValueEntry(int index)(package private) PersistentTrieMap.CompactMapNode<K,V>getNode(int index)(package private) java.lang.ObjectgetSlot(int index)(package private) VgetValue(int index)inthashCode()(package private) booleanhasNodes()(package private) booleanhasPayload()(package private) booleanhasSlots()(package private) intnodeArity()ArrayView<PersistentTrieMap.AbstractMapNode<K,V>>nodeArray()(package private) intpayloadArity()bytesizePredicate()Abstract predicate over a node's size.(package private) intslotArity()-
Methods inherited from class io.usethesource.capsule.core.PersistentTrieMap.CompactMixedMapNode
dataMap, nodeMap
-
Methods inherited from class io.usethesource.capsule.core.PersistentTrieMap.CompactMapNode
bitpos, containsKey, dataIndex, findByKey, index, index, mask, mergeTwoKeyValPairs, nodeAt, nodeIndex, nodeInvariant, nodeOf, nodeOf, nodeOf, recoverMask, removed, toString, updated
-
Methods inherited from class io.usethesource.capsule.core.PersistentTrieMap.AbstractMapNode
arity, dataArray, isAllowedToEdit, nodeIterator, size
-
-
-
-
Method Detail
-
nodeArray
public ArrayView<PersistentTrieMap.AbstractMapNode<K,V>> nodeArray()
-
getKey
K getKey(int index)
- Specified by:
getKeyin classPersistentTrieMap.AbstractMapNode<K,V>
-
getValue
V getValue(int index)
- Specified by:
getValuein classPersistentTrieMap.AbstractMapNode<K,V>
-
getKeyValueEntry
java.util.Map.Entry<K,V> getKeyValueEntry(int index)
- Specified by:
getKeyValueEntryin classPersistentTrieMap.AbstractMapNode<K,V>
-
getNode
PersistentTrieMap.CompactMapNode<K,V> getNode(int index)
- Specified by:
getNodein classPersistentTrieMap.CompactMapNode<K,V>
-
hasPayload
boolean hasPayload()
- Specified by:
hasPayloadin classPersistentTrieMap.AbstractMapNode<K,V>
-
payloadArity
int payloadArity()
- Specified by:
payloadArityin classPersistentTrieMap.AbstractMapNode<K,V>
-
hasNodes
boolean hasNodes()
- Specified by:
hasNodesin classPersistentTrieMap.AbstractMapNode<K,V>
-
nodeArity
int nodeArity()
- Specified by:
nodeArityin classPersistentTrieMap.AbstractMapNode<K,V>
-
getSlot
java.lang.Object getSlot(int index)
- Specified by:
getSlotin classPersistentTrieMap.AbstractMapNode<K,V>
-
hasSlots
boolean hasSlots()
- Specified by:
hasSlotsin classPersistentTrieMap.AbstractMapNode<K,V>
-
slotArity
int slotArity()
- Specified by:
slotArityin classPersistentTrieMap.AbstractMapNode<K,V>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
equivalent
public boolean equivalent(java.lang.Object other, EqualityComparator<java.lang.Object> cmp)
-
deepContentEquality
private final boolean deepContentEquality(java.lang.Object[] a1, java.lang.Object[] a2, int splitAt, int length, EqualityComparator<java.lang.Object> cmp)
-
sizePredicate
public byte sizePredicate()
Description copied from interface:Node- Returns:
- size predicate
-
copyAndSetValue
PersistentTrieMap.CompactMapNode<K,V> copyAndSetValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, V val)
- Specified by:
copyAndSetValuein classPersistentTrieMap.CompactMapNode<K,V>
-
copyAndSetNode
PersistentTrieMap.CompactMapNode<K,V> copyAndSetNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)
- Specified by:
copyAndSetNodein classPersistentTrieMap.CompactMapNode<K,V>
-
copyAndInsertValue
PersistentTrieMap.CompactMapNode<K,V> copyAndInsertValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)
- Specified by:
copyAndInsertValuein classPersistentTrieMap.CompactMapNode<K,V>
-
copyAndRemoveValue
PersistentTrieMap.CompactMapNode<K,V> copyAndRemoveValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)
- Specified by:
copyAndRemoveValuein classPersistentTrieMap.CompactMapNode<K,V>
-
copyAndMigrateFromInlineToNode
PersistentTrieMap.CompactMapNode<K,V> copyAndMigrateFromInlineToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)
- Specified by:
copyAndMigrateFromInlineToNodein classPersistentTrieMap.CompactMapNode<K,V>
-
copyAndMigrateFromNodeToInline
PersistentTrieMap.CompactMapNode<K,V> copyAndMigrateFromNodeToInline(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieMap.AbstractMapNode<K,V> node)
- Specified by:
copyAndMigrateFromNodeToInlinein classPersistentTrieMap.CompactMapNode<K,V>
-
-