Package io.usethesource.capsule.core
Class PersistentTrieSetMultimap.BitmapIndexedSetMultimapNode<K,V>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactMixedSetMultimapNode<K,V>
io.usethesource.capsule.core.PersistentTrieSetMultimap.BitmapIndexedSetMultimapNode<K,V>
- All Implemented Interfaces:
MultimapNode<K,
,V, Set.Immutable<V>, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V>> Node
,Serializable
- Enclosing class:
PersistentTrieSetMultimap<K,
V>
private static final class PersistentTrieSetMultimap.BitmapIndexedSetMultimapNode<K,V>
extends PersistentTrieSetMultimap.CompactMixedSetMultimapNode<K,V>
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final AtomicReference
<Thread> (package private) final Object[]
Fields inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactSetMultimapNode
BIT_PARTITION_MASK, BIT_PARTITION_SIZE, EMPTY_NODE, HASH_CODE_LENGTH
Fields inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.AbstractSetMultimapNode
TUPLE_LENGTH
Fields inherited from interface io.usethesource.capsule.core.trie.Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
BitmapIndexedSetMultimapNode
(AtomicReference<Thread> mutator, int rawMap1, int rawMap2, Object[] nodes) -
Method Summary
Modifier and TypeMethodDescription(package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> canonicalize
(AtomicReference<Thread> mutator, int keyHash, int shift) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndInsertCollection
(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndInsertSingleton
(AtomicReference<Thread> mutator, int bitpos, K key, V val) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromCollectionToNode
(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromCollectionToSingleton
(AtomicReference<Thread> mutator, int bitpos, K key, V val) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromNodeToCollection
(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromNodeToSingleton
(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) private Object[]
copyAndMigrateFromNodeToXxx
(int idxOld, int idxNew, Object keyToInline, Object valToInline) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromSingletonToCollection
(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndMigrateFromSingletonToNode
(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) private Object[]
copyAndMigrateFromXxxToNode
(int idxOld, int idxNew, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndRemoveCollection
(AtomicReference<Thread> mutator, int bitpos) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndRemoveSingleton
(AtomicReference<Thread> mutator, int bitpos) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndSetCollectionValue
(AtomicReference<Thread> mutator, int bitpos, Set.Immutable<V> valColl) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndSetNode
(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> copyAndSetSingletonValue
(AtomicReference<Thread> mutator, int bitpos, V val) copyAndSetXxxValue
(AtomicReference<Thread> mutator, int idx, Object newValue) copyAndUpdateBitmaps
(AtomicReference<Thread> mutator, int rawMap1, int rawMap2) boolean
(package private) K
getCollectionKey
(int index) (package private) Set.Immutable
<V> getCollectionValue
(int index) (package private) PersistentTrieSetMultimap.CompactSetMultimapNode
<K, V> getNode
(int index) (package private) K
getSingletonKey
(int index) (package private) V
getSingletonValue
(int index) (package private) Object
getSlot
(int index) int
hashCode()
(package private) boolean
hasNodes()
(package private) boolean
(package private) boolean
hasSlots()
(package private) int
(package private) int
byte
Abstract predicate over a node's size.(package private) int
private <T> Iterator
<T> ziperator
(int expectedSize, int bitmap0, Iterator<T> dataIterator0, int bitmap1, Iterator<T> dataIterator1) Methods inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactMixedSetMultimapNode
bitmap, collMap, dataMap, nodeMap, rawMap1, rawMap2
Methods inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactSetMultimapNode
arity, arity, bitpos, collIndex, containsKey, containsTuple, dataIndex, findByKey, index, index, insertedMultiple, insertedSingle, mask, mergeCollectionAndSingletonPairs, mergeTwoCollectionPairs, mergeTwoSingletonPairs, nodeIndex, nodeInvariant, nodeOf, nodeOf, nodeOf, recoverMask, removed, removed, toString, updated, updatedMultiple, updatedSingle
Methods inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.AbstractSetMultimapNode
dataArray, isAllowedToEdit, mustUnbox, nodeIterator, size, unbox
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface io.usethesource.capsule.core.trie.MultimapNode
copyAndUpdateBitmaps, inserted, patternOfSingleton
-
Field Details
-
mutator
-
nodes
-
-
Constructor Details
-
BitmapIndexedSetMultimapNode
private BitmapIndexedSetMultimapNode(AtomicReference<Thread> mutator, int rawMap1, int rawMap2, Object[] nodes)
-
-
Method Details
-
nodeArray
-
getSingletonKey
- Specified by:
getSingletonKey
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
getSingletonValue
- Specified by:
getSingletonValue
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
getCollectionKey
- Specified by:
getCollectionKey
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
getCollectionValue
- Specified by:
getCollectionValue
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
getNode
- Specified by:
getNode
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
hasPayload
- Specified by:
hasPayload
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
payloadArity
- Specified by:
payloadArity
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
hasNodes
boolean hasNodes()- Specified by:
hasNodes
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
nodeArity
int nodeArity()- Specified by:
nodeArity
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
getSlot
- Specified by:
getSlot
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
ziperator
-
hasSlots
boolean hasSlots()- Specified by:
hasSlots
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
slotArity
int slotArity()- Specified by:
slotArity
in classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,
V>
-
hashCode
public int hashCode() -
equals
-
sizePredicate
public byte sizePredicate()Description copied from interface:Node
- Returns:
- size predicate
-
copyAndSetSingletonValue
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetSingletonValue(AtomicReference<Thread> mutator, int bitpos, V val) - Specified by:
copyAndSetSingletonValue
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndSetCollectionValue
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetCollectionValue(AtomicReference<Thread> mutator, int bitpos, Set.Immutable<V> valColl) - Specified by:
copyAndSetCollectionValue
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndSetXxxValue
private PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetXxxValue(AtomicReference<Thread> mutator, int idx, Object newValue) -
copyAndSetNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) - Specified by:
copyAndSetNode
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndInsertSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) - Specified by:
copyAndInsertSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndInsertCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) - Specified by:
copyAndInsertCollection
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromSingletonToCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) - Specified by:
copyAndMigrateFromSingletonToCollection
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromCollectionToSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) - Specified by:
copyAndMigrateFromCollectionToSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndRemoveSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveSingleton(AtomicReference<Thread> mutator, int bitpos) - Specified by:
copyAndRemoveSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndRemoveCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveCollection(AtomicReference<Thread> mutator, int bitpos) - Specified by:
copyAndRemoveCollection
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromSingletonToNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) - Specified by:
copyAndMigrateFromSingletonToNode
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromCollectionToNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) - Specified by:
copyAndMigrateFromCollectionToNode
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromXxxToNode
private Object[] copyAndMigrateFromXxxToNode(int idxOld, int idxNew, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndMigrateFromNodeToSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToSingleton(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) - Specified by:
copyAndMigrateFromNodeToSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromNodeToCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToCollection(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) - Specified by:
copyAndMigrateFromNodeToCollection
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-
copyAndMigrateFromNodeToXxx
-
copyAndUpdateBitmaps
public PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndUpdateBitmaps(AtomicReference<Thread> mutator, int rawMap1, int rawMap2) -
typeOfSingleton
-
canonicalize
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> canonicalize(AtomicReference<Thread> mutator, int keyHash, int shift) - Specified by:
canonicalize
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,
V>
-