GenericEncodedNodeScannerTKey, TValue Class

Base class for reading from a node that is encoded and must be read sequentially through the node.

Definition

Namespace: SnapDB.Snap.Tree
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public class GenericEncodedNodeScanner<TKey, TValue> : SortedTreeScannerBase<TKey, TValue>
where TKey : new(), SnapTypeBase<TKey>
where TValue : new(), SnapTypeBase<TValue>
Inheritance
Object    TreeStreamTKey, TValue    SeekableTreeStreamTKey, TValue    SortedTreeScannerBaseTKey, TValue    GenericEncodedNodeScannerTKey, TValue

Type Parameters

TKey
The type of keys stored in the nodes.
TValue
The type of values stored in the nodes.

Constructors

GenericEncodedNodeScannerTKey, TValue Initializes a new instance of the GenericEncodedNodeScannerTKey, TValue class with the specified encoding, node level, block size, binary stream, and key lookup function.

Properties

Eos Boolean indicating that the end of the stream has been read or class has been disposed.
(Inherited from TreeStreamTKey, TValue)
HeaderSize The number of bytes in the header of any given node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
IsAlwaysSequential Gets if the stream is always in sequential order. Do not return true unless it is guaranteed that the data read from this stream is sequential.
(Inherited from SortedTreeScannerBaseTKey, TValue)
LeftSiblingNodeIndex The node index of the previous sibling. uint.MaxValue means there is no sibling to the right.
(Inherited from SortedTreeScannerBaseTKey, TValue)
NeverContainsDuplicates Gets if the stream will never return duplicate keys. Do not return true unless it is guaranteed that the data read from this stream will never contain duplicates.
(Inherited from SortedTreeScannerBaseTKey, TValue)
NodeIndex The index of the current node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
Pointer The pointer that is right after the header of the node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
PointerVersion The pointer version of the Pointer. Compare to Stream.PointerVersion to find out if this pointer is current.
(Inherited from SortedTreeScannerBaseTKey, TValue)
RecordCount The number of records in the current node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
RightSiblingNodeIndex The node index of the next sibling. uint.MaxValue means there is no sibling to the right.
(Inherited from SortedTreeScannerBaseTKey, TValue)

Methods

Dispose Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(Inherited from TreeStreamTKey, TValue)
Dispose(Boolean) Releases the unmanaged resources used by the TreeStreamTKey, TValue object and optionally releases the managed resources.
(Inherited from TreeStreamTKey, TValue)
EndOfStreamReached Occurs when the end of the stream has been reached. The default behavior is to call Dispose.
(Inherited from TreeStreamTKey, TValue)
EqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
FinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
FindKey Finds the specified key within the node and positions the scanner at the first key-value pair that matches or is greater than the specified key.
(Overrides SortedTreeScannerBaseTKey, TValueFindKey(TKey))
FindLeafNodeAddress Gets the block index when seeking for the provided key.
(Inherited from SortedTreeScannerBaseTKey, TValue)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetTypeGets the Type of the current instance.
(Inherited from Object)
InternalPeek Reads and decodes the next key-value pair at the current position for peeking without advancing the position.
(Overrides SortedTreeScannerBaseTKey, TValueInternalPeek(TKey, TValue))
InternalRead(TKey, TValue) Reads and decodes the next key-value pair at the current position and advances the position.
(Overrides SortedTreeScannerBaseTKey, TValueInternalRead(TKey, TValue))
InternalRead(TKey, TValue, MatchFilterBaseTKey, TValue) Reads and decodes the next key-value pair at the current position, advances the position, and checks if it matches the specified filter.
(Overrides SortedTreeScannerBaseTKey, TValueInternalRead(TKey, TValue, MatchFilterBaseTKey, TValue))
InternalReadWhile(TKey, TValue, TKey) Reads and decodes the next key-value pair at the current position, advances the position, and continues reading as long as the key is less than the specified upper bounds.
(Overrides SortedTreeScannerBaseTKey, TValueInternalReadWhile(TKey, TValue, TKey))
InternalReadWhile(TKey, TValue, TKey, MatchFilterBaseTKey, TValue) Reads and decodes the next key-value pair at the current position, advances the position, and continues reading as long as the key is less than the specified upper bounds and matches the filter condition.
(Overrides SortedTreeScannerBaseTKey, TValueInternalReadWhile(TKey, TValue, TKey, MatchFilterBaseTKey, TValue))
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
OnNoadReload Occurs when a node's data is reset. Derived classes can override this method if fields need to be reset when a node is loaded.
(Overrides SortedTreeScannerBaseTKey, TValueOnNoadReload)
Peek Reads the next point, but doees not advance the position of the stream.
(Inherited from SortedTreeScannerBaseTKey, TValue)
PeekCatchAll Peeks at the next key and value in the node without advancing the cursor and handles various cases.
(Inherited from SortedTreeScannerBaseTKey, TValue)
Read Advances the stream to the next value. If before the beginning of the stream, advances to the first value
(Inherited from TreeStreamTKey, TValue)
ReadAsync Advances the stream to the next value. If before the beginning of the stream, advances to the first value
(Inherited from TreeStreamTKey, TValue)
ReadBackwardish Reads the key-value pair backwardish (in reverse order) from the tree node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadCatchAll A catch all read function.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadNext Advances the stream to the next value. If before the beginning of the stream, advances to the first value.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadWhile(TKey, TValue, TKey) Continues to advance the stream but stops short of returning the point that is equal to the provided key.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadWhile(TKey, TValue, TKey, MatchFilterBaseTKey, TValue) Using the provided filter, continues to advance the stream but stops short of returning the point that is equal to the provided key.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadWhileCatchAll(TKey, TValue, TKey) Reads key-value pairs in the node while the key is less than the upper bounds, handling various cases and advancing the cursor.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ReadWhileCatchAll(TKey, TValue, TKey, MatchFilterBaseTKey, TValue) Reads key-value pairs in the node while the key is less than the upper bounds, applying an optional filter, and advancing the cursor.
(Inherited from SortedTreeScannerBaseTKey, TValue)
SeekToKey Seeks the stream to the first value greater than or equal to key.
(Inherited from SortedTreeScannerBaseTKey, TValue)
SeekToStart Seeks to the start of SortedTree.
(Inherited from SortedTreeScannerBaseTKey, TValue)
SetEos Sets the end-of-stream (EOS) flag, indicating whether the stream has reached its end.
(Inherited from TreeStreamTKey, TValue)
ToStringReturns a string that represents the current object.
(Inherited from Object)

Fields

BlockSize Represents the size of the block within the node.
(Inherited from SortedTreeScannerBaseTKey, TValue)
IndexOfNextKeyValue The index number of the next key/value that needs to be read. The valid range of this field is [0, RecordCount - 1].
(Inherited from SortedTreeScannerBaseTKey, TValue)
KeyMethods Represents the custom methods for the keys used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)
KeySize Represents the size, in bytes, of the keys used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)
LowerKey Represents the lower bound key used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)
Stream Represents the stream used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)
UpperKey Represents the upper bound key used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)
ValueSize Represents the size, in bytes, of the values used in this context.
(Inherited from SortedTreeScannerBaseTKey, TValue)

See Also