Package io.grpc
Class PersistentHashArrayMappedTrie.CompressedIndex<K,V>
- java.lang.Object
-
- io.grpc.PersistentHashArrayMappedTrie.CompressedIndex<K,V>
-
- All Implemented Interfaces:
PersistentHashArrayMappedTrie.Node<K,V>
- Enclosing class:
- PersistentHashArrayMappedTrie
static final class PersistentHashArrayMappedTrie.CompressedIndex<K,V> extends java.lang.Object implements PersistentHashArrayMappedTrie.Node<K,V>
-
-
Constructor Summary
Constructors Modifier Constructor Description private
CompressedIndex(int bitmap, PersistentHashArrayMappedTrie.Node<K,V>[] values, int size)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static <K,V>
PersistentHashArrayMappedTrie.Node<K,V>combine(PersistentHashArrayMappedTrie.Node<K,V> node1, int hash1, PersistentHashArrayMappedTrie.Node<K,V> node2, int hash2, int bitsConsumed)
private int
compressedIndex(int indexBit)
V
get(K key, int hash, int bitsConsumed)
private static int
indexBit(int hash, int bitsConsumed)
PersistentHashArrayMappedTrie.Node<K,V>
put(K key, V value, int hash, int bitsConsumed)
int
size()
java.lang.String
toString()
private static int
uncompressedIndex(int hash, int bitsConsumed)
-
-
-
Field Detail
-
BITS
private static final int BITS
- See Also:
- Constant Field Values
-
BITS_MASK
private static final int BITS_MASK
- See Also:
- Constant Field Values
-
bitmap
final int bitmap
-
values
final PersistentHashArrayMappedTrie.Node<K,V>[] values
-
size
private final int size
-
-
Constructor Detail
-
CompressedIndex
private CompressedIndex(int bitmap, PersistentHashArrayMappedTrie.Node<K,V>[] values, int size)
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacePersistentHashArrayMappedTrie.Node<K,V>
-
get
public V get(K key, int hash, int bitsConsumed)
- Specified by:
get
in interfacePersistentHashArrayMappedTrie.Node<K,V>
-
put
public PersistentHashArrayMappedTrie.Node<K,V> put(K key, V value, int hash, int bitsConsumed)
- Specified by:
put
in interfacePersistentHashArrayMappedTrie.Node<K,V>
-
combine
static <K,V> PersistentHashArrayMappedTrie.Node<K,V> combine(PersistentHashArrayMappedTrie.Node<K,V> node1, int hash1, PersistentHashArrayMappedTrie.Node<K,V> node2, int hash2, int bitsConsumed)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
compressedIndex
private int compressedIndex(int indexBit)
-
uncompressedIndex
private static int uncompressedIndex(int hash, int bitsConsumed)
-
indexBit
private static int indexBit(int hash, int bitsConsumed)
-
-