Class PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
java.lang.Object
io.usethesource.capsule.core.PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
- All Implemented Interfaces:
MultimapNode<K, V, Set.Immutable<V>, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>>, Node, Serializable
- Direct Known Subclasses:
PersistentTrieSetMultimap.AbstractHashCollisionNode, PersistentTrieSetMultimap.CompactMixedSetMultimapNode
- Enclosing class:
PersistentTrieSetMultimap<K,V>
protected abstract static class PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
extends PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final int(package private) static final int(package private) static final PersistentTrieSetMultimap.CompactSetMultimapNode(package private) static final intFields inherited from class PersistentTrieSetMultimap.AbstractSetMultimapNode
TUPLE_LENGTHFields inherited from interface Node
SIZE_EMPTY, SIZE_MORE_THAN_ONE, SIZE_ONE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) intarity()Deprecated.(package private) static final intarity(int bitmap) (package private) abstract intbitmap(int category) (package private) static final intbitpos(int mask) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> canonicalize(AtomicReference<Thread> mutator, int keyHash, int shift) (package private) final intcollIndex(int bitpos) Deprecated.(package private) abstract intcollMap()Deprecated.booleancontainsKey(K key, int keyHash, int shift, EqualityComparator<Object> cmp) booleancontainsTuple(K key, V value, int keyHash, int shift, EqualityComparator<Object> cmp) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndInsertCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> values) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndInsertSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromCollectionToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromCollectionToSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromNodeToCollection(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromNodeToSingleton(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromSingletonToCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndMigrateFromSingletonToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndRemoveCollection(AtomicReference<Thread> mutator, int bitpos) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndRemoveSingleton(AtomicReference<Thread> mutator, int bitpos) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndSetCollectionValue(AtomicReference<Thread> mutator, int bitpos, Set.Immutable<V> valColl) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K, V> copyAndSetSingletonValue(AtomicReference<Thread> mutator, int bitpos, V val) (package private) final intdataIndex(int bitpos) Deprecated.(package private) abstract intdataMap()Deprecated.findByKey(K key, int keyHash, int shift, EqualityComparator<Object> cmp) (package private) abstract PersistentTrieSetMultimap.CompactSetMultimapNode<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) insertedMultiple(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) insertedSingle(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) (package private) static final intmask(int keyHash, int shift) (package private) static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode <K, V> mergeCollectionAndSingletonPairs(K key0, Set.Immutable<V> valColl0, int keyHash0, K key1, V val1, int keyHash1, int shift, EqualityComparator<Object> cmp) (package private) static final <K, V, C extends Set.Immutable<V>>
PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> mergeTwoCollectionPairs(K key0, C valColl0, int keyHash0, K key1, C valColl1, int keyHash1, int shift, EqualityComparator<Object> cmp) (package private) static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode <K, V> mergeTwoSingletonPairs(K key0, V val0, int keyHash0, K key1, V val1, int keyHash1, int shift, EqualityComparator<Object> cmp) (package private) final intnodeIndex(int bitpos) Deprecated.(package private) boolean(package private) abstract intnodeMap()Deprecated.(package private) static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode <K, V> nodeOf(AtomicReference<Thread> mutator) (package private) static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode <K, V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes) (package private) static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode <K, V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, K key, Set.Immutable<V> valColl) (package private) abstract intrawMap1()(package private) abstract intrawMap2()(package private) static byterecoverMask(int map, byte i_th) removed(AtomicReference<Thread> mutator, K key, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) Removes all values associated withkey.removed(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) Removes thekey/valtuple.toString()updated(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) updatedMultiple(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) updatedSingle(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) Methods inherited from class PersistentTrieSetMultimap.AbstractSetMultimapNode
dataArray, getCollectionKey, getCollectionValue, getSingletonKey, getSingletonValue, getSlot, hasNodes, hasPayload, hasSlots, isAllowedToEdit, mustUnbox, nodeArity, nodeArray, nodeIterator, payloadArity, size, slotArity, unboxMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface MultimapNode
copyAndUpdateBitmaps, inserted, patternOfSingleton, typeOfSingletonMethods 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:
-
EMPTY_NODE
-
-
Constructor Details
-
CompactSetMultimapNode
protected CompactSetMultimapNode()
-
-
Method Details
-
mask
static final int mask(int keyHash, int shift) -
bitpos
static final int bitpos(int mask) -
bitmap
abstract int bitmap(int category) -
dataMap
Deprecated. -
collMap
Deprecated. -
nodeMap
Deprecated. -
rawMap1
abstract int rawMap1() -
rawMap2
abstract int rawMap2() -
arity
Deprecated.Description copied from class:PersistentTrieSetMultimap.AbstractSetMultimapNodeThe arity of this trie node (i.e. number of values and nodes stored on this level).- Specified by:
arityin classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> - Returns:
- sum of nodes and values stored within
-
arity
static final int arity(int bitmap) -
getNode
- Specified by:
getNodein classPersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>
-
nodeInvariant
boolean nodeInvariant() -
copyAndSetSingletonValue
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetSingletonValue(AtomicReference<Thread> mutator, int bitpos, V val) -
copyAndSetCollectionValue
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetCollectionValue(AtomicReference<Thread> mutator, int bitpos, Set.Immutable<V> valColl) -
copyAndSetNode
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndInsertSingleton
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) -
copyAndInsertCollection
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndInsertCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> values) -
copyAndMigrateFromSingletonToCollection
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToCollection(AtomicReference<Thread> mutator, int bitpos, K key, Set.Immutable<V> valColl) -
copyAndRemoveSingleton
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveSingleton(AtomicReference<Thread> mutator, int bitpos) -
copyAndRemoveCollection
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveCollection(AtomicReference<Thread> mutator, int bitpos) -
copyAndMigrateFromSingletonToNode
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromSingletonToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndMigrateFromNodeToSingleton
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToSingleton(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndMigrateFromCollectionToNode
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToNode(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndMigrateFromNodeToCollection
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToCollection(AtomicReference<Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K, V> node) -
copyAndMigrateFromCollectionToSingleton
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromCollectionToSingleton(AtomicReference<Thread> mutator, int bitpos, K key, V val) -
mergeTwoSingletonPairs
static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> mergeTwoSingletonPairs(K key0, V val0, int keyHash0, K key1, V val1, int keyHash1, int shift, EqualityComparator<Object> cmp) -
mergeCollectionAndSingletonPairs
static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> mergeCollectionAndSingletonPairs(K key0, Set.Immutable<V> valColl0, int keyHash0, K key1, V val1, int keyHash1, int shift, EqualityComparator<Object> cmp) -
mergeTwoCollectionPairs
static final <K, V, C extends Set.Immutable<V>> PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> mergeTwoCollectionPairs(K key0, C valColl0, int keyHash0, K key1, C valColl1, int keyHash1, int shift, EqualityComparator<Object> cmp) -
nodeOf
static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, Object[] nodes) -
nodeOf
static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> nodeOf(AtomicReference<Thread> mutator) -
nodeOf
static final <K,V> PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> nodeOf(AtomicReference<Thread> mutator, int nodeMap, int dataMap, K key, Set.Immutable<V> valColl) -
index
static final int index(int bitmap, int bitpos) -
index
static final int index(int bitmap, int mask, int bitpos) -
dataIndex
Deprecated. -
collIndex
Deprecated. -
nodeIndex
Deprecated. -
containsKey
-
containsTuple
public boolean containsTuple(K key, V value, int keyHash, int shift, EqualityComparator<Object> cmp) -
findByKey
public Optional<Set.Immutable<V>> findByKey(K key, int keyHash, int shift, EqualityComparator<Object> cmp) -
insertedSingle
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> insertedSingle(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) -
insertedMultiple
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> insertedMultiple(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) -
updated
public final PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> updated(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) -
updatedSingle
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> updatedSingle(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) -
updatedMultiple
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> updatedMultiple(AtomicReference<Thread> mutator, K key, Set.Immutable<V> values, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) -
removed
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> removed(AtomicReference<Thread> mutator, K key, V value, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) Description copied from interface:MultimapNodeRemoves thekey/valtuple. -
removed
public PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> removed(AtomicReference<Thread> mutator, K key, int keyHash, int shift, MultimapResult<K, V, Set.Immutable<V>> details, EqualityComparator<Object> cmp) Description copied from interface:MultimapNodeRemoves all values associated withkey. -
canonicalize
abstract PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> canonicalize(AtomicReference<Thread> mutator, int keyHash, int shift) -
recoverMask
static byte recoverMask(int map, byte i_th) - Returns:
- 0 invalid input: '<'= mask invalid input: '<'= 2^BIT_PARTITION_SIZE - 1
-
toString
-