Package io.usethesource.capsule.core
Class PersistentTrieSetMultimap.AbstractHashCollisionNode<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.AbstractHashCollisionNode<K,V>
-
- All Implemented Interfaces:
MultimapNode<K,V,Set.Immutable<V>,PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V>>
,Node
,java.io.Serializable
- Direct Known Subclasses:
PersistentTrieSetMultimap.HashCollisionNode
- Enclosing class:
- PersistentTrieSetMultimap<K,V>
private abstract static class PersistentTrieSetMultimap.AbstractHashCollisionNode<K,V> extends PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.RuntimeException
UOE_BOILERPLATE
private static java.util.function.Supplier<java.lang.RuntimeException>
UOE_FACTORY
-
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 private
AbstractHashCollisionNode()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) int
bitmap(int category)
(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
canonicalize(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int keyHash, int shift)
(package private) int
collMap()
(package private) PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
copyAndInsertCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, K key, Set.Immutable<V> values)
(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)
(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)
(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)
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
copyAndUpdateBitmaps(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int rawMap1, int rawMap2)
(package private) int
dataMap()
(package private) int
nodeMap()
(package private) static <K,V,VS extends Set.Immutable<V>>
PersistentTrieSetMultimap.AbstractHashCollisionNode<K,V>of(int hash, K key0, VS valColl0, K key1, VS valColl1)
(package private) int
rawMap1()
(package private) int
rawMap2()
EitherSingletonOrCollection.Type
typeOfSingleton()
-
Methods inherited from class io.usethesource.capsule.core.PersistentTrieSetMultimap.CompactSetMultimapNode
arity, arity, bitpos, collIndex, containsKey, containsTuple, dataIndex, findByKey, getNode, 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, getCollectionKey, getCollectionValue, getSingletonKey, getSingletonValue, getSlot, hasNodes, hasPayload, hasSlots, isAllowedToEdit, mustUnbox, nodeArity, nodeArray, nodeIterator, payloadArity, size, slotArity, unbox
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface io.usethesource.capsule.core.trie.MultimapNode
copyAndUpdateBitmaps, inserted, patternOfSingleton
-
Methods inherited from interface io.usethesource.capsule.core.trie.Node
sizePredicate
-
-
-
-
Method Detail
-
of
static final <K,V,VS extends Set.Immutable<V>> PersistentTrieSetMultimap.AbstractHashCollisionNode<K,V> of(int hash, K key0, VS valColl0, K key1, VS valColl1)
-
bitmap
int bitmap(int category)
- Specified by:
bitmap
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
dataMap
int dataMap()
- Specified by:
dataMap
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
collMap
int collMap()
- Specified by:
collMap
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
nodeMap
int nodeMap()
- Specified by:
nodeMap
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
rawMap1
int rawMap1()
- Specified by:
rawMap1
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
rawMap2
int rawMap2()
- Specified by:
rawMap2
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndUpdateBitmaps
public PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndUpdateBitmaps(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int rawMap1, int rawMap2)
-
copyAndSetSingletonValue
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetSingletonValue(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, V val)
- Specified by:
copyAndSetSingletonValue
in 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:
copyAndSetCollectionValue
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndSetNode
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndSetNode(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndSetNode
in 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:
copyAndInsertSingleton
in 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> values)
- Specified by:
copyAndInsertCollection
in 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:
copyAndMigrateFromSingletonToCollection
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndRemoveSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)
- Specified by:
copyAndRemoveSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndRemoveCollection
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndRemoveCollection(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos)
- Specified by:
copyAndRemoveCollection
in 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:
copyAndMigrateFromSingletonToNode
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
copyAndMigrateFromNodeToSingleton
PersistentTrieSetMultimap.CompactSetMultimapNode<K,V> copyAndMigrateFromNodeToSingleton(java.util.concurrent.atomic.AtomicReference<java.lang.Thread> mutator, int bitpos, PersistentTrieSetMultimap.AbstractSetMultimapNode<K,V> node)
- Specified by:
copyAndMigrateFromNodeToSingleton
in 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:
copyAndMigrateFromCollectionToNode
in 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:
copyAndMigrateFromNodeToCollection
in 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:
copyAndMigrateFromCollectionToSingleton
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
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:
canonicalize
in classPersistentTrieSetMultimap.CompactSetMultimapNode<K,V>
-
-