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,java.io.Serializable
- Enclosing class:
- PersistentTrieSetMultimap<K,V>
private static final class PersistentTrieSetMultimap.BitmapIndexedSetMultimapNode<K,V> extends PersistentTrieSetMultimap.CompactMixedSetMultimapNode<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.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
Constructors Modifier Constructor Description privateBitmapIndexedSetMultimapNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int rawMap1, int rawMap2, java.lang.Object[] nodes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>canonicalize(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int keyHash, int shift)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndInsertCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndInsertSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromCollectionToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromCollectionToSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromNodeToCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromNodeToSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)private java.lang.Object[]copyAndMigrateFromNodeToXxx(int idxOld, int idxNew, java.lang.Object keyToInline, java.lang.Object valToInline)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromSingletonToCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndMigrateFromSingletonToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)private java.lang.Object[]copyAndMigrateFromXxxToNode(int idxOld, int idxNew, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndRemoveCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndRemoveSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndSetCollectionValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, Set.Immutable<V> valColl)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndSetNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndSetSingletonValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, V val)private PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndSetXxxValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int idx, java.lang.Object newValue)PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>copyAndUpdateBitmaps(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int rawMap1, int rawMap2)booleanequals(java.lang.Object other)(package private) KgetCollectionKey(int index)(package private) Set.Immutable<V>getCollectionValue(int index)(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>getNode(int index)(package private) KgetSingletonKey(int index)(package private) VgetSingletonValue(int index)(package private) java.lang.ObjectgetSlot(int index)inthashCode()(package private) booleanhasNodes()(package private) booleanhasPayload(EitherSingletonOrCollection.Type type)(package private) booleanhasSlots()(package private) intnodeArity()ArrayView<PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>>nodeArray()(package private) intpayloadArity(EitherSingletonOrCollection.Type type)bytesizePredicate()Abstract predicate over a node's size.(package private) intslotArity()EitherSingletonOrCollection.TypetypeOfSingleton()private <T> java.util.Iterator<T>ziperator(int expectedSize, int bitmap0, java.util.Iterator<T> dataIterator0, int bitmap1, java.util.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
-
-
-
-
Method Detail
-
nodeArray
public ArrayView<PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>> nodeArray()
-
getSingletonKey
K getSingletonKey(int index)
- Specified by:
getSingletonKeyin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
getSingletonValue
V getSingletonValue(int index)
- Specified by:
getSingletonValuein classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
getCollectionKey
K getCollectionKey(int index)
- Specified by:
getCollectionKeyin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
getCollectionValue
Set.Immutable<V> getCollectionValue(int index)
- Specified by:
getCollectionValuein classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
getNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> getNode(int index)
- Specified by:
getNodein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
hasPayload
boolean hasPayload(EitherSingletonOrCollection.Type type)
- Specified by:
hasPayloadin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
payloadArity
int payloadArity(EitherSingletonOrCollection.Type type)
- Specified by:
payloadArityin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
hasNodes
boolean hasNodes()
- Specified by:
hasNodesin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
nodeArity
int nodeArity()
- Specified by:
nodeArityin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
getSlot
java.lang.Object getSlot(int index)
- Specified by:
getSlotin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
ziperator
private <T> java.util.Iterator<T> ziperator(int expectedSize, int bitmap0, java.util.Iterator<T> dataIterator0, int bitmap1, java.util.Iterator<T> dataIterator1)
-
hasSlots
boolean hasSlots()
- Specified by:
hasSlotsin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
slotArity
int slotArity()
- Specified by:
slotArityin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equalsin classjava.lang.Object
-
sizePredicate
public byte sizePredicate()
Description copied from interface:Node- Returns:
- size predicate
-
copyAndSetSingletonValue
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetSingletonValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, V val)
- Specified by:
copyAndSetSingletonValuein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndSetCollectionValue
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetCollectionValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, Set.Immutable<V> valColl)
- Specified by:
copyAndSetCollectionValuein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndSetXxxValue
private PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetXxxValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int idx, java.lang.Object newValue)
-
copyAndSetNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndSetNodein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndInsertSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)
- Specified by:
copyAndInsertSingletonin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndInsertCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl)
- Specified by:
copyAndInsertCollectionin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromSingletonToCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl)
- Specified by:
copyAndMigrateFromSingletonToCollectionin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromCollectionToSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, V val)
- Specified by:
copyAndMigrateFromCollectionToSingletonin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndRemoveSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)
- Specified by:
copyAndRemoveSingletonin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndRemoveCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)
- Specified by:
copyAndRemoveCollectionin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromSingletonToNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndMigrateFromSingletonToNodein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromCollectionToNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndMigrateFromCollectionToNodein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromXxxToNode
private java.lang.Object[] copyAndMigrateFromXxxToNode(int idxOld, int idxNew, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
-
copyAndMigrateFromNodeToSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndMigrateFromNodeToSingletonin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromNodeToCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndMigrateFromNodeToCollectionin classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromNodeToXxx
private java.lang.Object[] copyAndMigrateFromNodeToXxx(int idxOld, int idxNew, java.lang.Object keyToInline, java.lang.Object valToInline)
-
copyAndUpdateBitmaps
public PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndUpdateBitmaps(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int rawMap1, int rawMap2)
-
typeOfSingleton
public EitherSingletonOrCollection.Type typeOfSingleton()
-
canonicalize
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> canonicalize(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int keyHash, int shift)
- Specified by:
canonicalizein classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
-