Package org.apache.cassandra.db.tries
Class InMemoryReadTrie<T>
- java.lang.Object
-
- org.apache.cassandra.db.tries.Trie<T>
-
- org.apache.cassandra.db.tries.InMemoryReadTrie<T>
-
- Direct Known Subclasses:
InMemoryTrie
public class InMemoryReadTrie<T> extends Trie<T>
In-memory trie built for fast modification and reads executing concurrently with writes from a single mutator thread. This class provides the read-only functionality, expanded inInMemoryTrie
to writes.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.cassandra.db.tries.Trie
Trie.CollectionMergeResolver<T>, Trie.Cursor<T>, Trie.MergeResolver<T>, Trie.ResettingTransitionsReceiver, Trie.TransitionsReceiver, Trie.ValueConsumer<T>, Trie.Walker<T,R>
-
-
Field Summary
-
Fields inherited from class org.apache.cassandra.db.tries.Trie
BYTE_COMPARABLE_VERSION
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.apache.cassandra.db.tries.InMemoryReadTrie.MemtableCursor
cursor()
java.lang.String
dump(java.util.function.Function<T,java.lang.String> contentToString)
Override of dump to provide more detailed printout that includes the type of each node in the trie.protected int
followContentTransition(int node)
T
get(ByteComparable path)
Get the content mapped by the specified key.boolean
isEmpty()
-
Methods inherited from class org.apache.cassandra.db.tries.Trie
dump, empty, entryIterator, entrySet, forEachEntry, forEachValue, merge, mergeDistinct, mergeWith, process, singleton, subtrie, subtrie, throwingResolver, valueIterator, values, valuesUnordered
-
-
-
-
Method Detail
-
followContentTransition
protected int followContentTransition(int node)
-
cursor
public org.apache.cassandra.db.tries.InMemoryReadTrie.MemtableCursor cursor()
-
get
public T get(ByteComparable path)
Get the content mapped by the specified key. Fast implementation using integer node addresses.
-
isEmpty
public boolean isEmpty()
-
dump
public java.lang.String dump(java.util.function.Function<T,java.lang.String> contentToString)
Override of dump to provide more detailed printout that includes the type of each node in the trie. We do this via a wrapping cursor that returns a content string for the type of node for every node we return.
-
-