FixedSizeNodeTKey, TValue Class

A node for a SortedTree that is encoded in a fixed width. This allows binary searches and faster writing.

Definition

Namespace: SnapDB.Snap.Tree
Assembly: SnapDB (in SnapDB.dll) Version: 1.0.102.0 -- Release Build+29075351d0e5aa4dea46a5c520805222f672dc2e
public class FixedSizeNode<TKey, TValue> : SortedTreeNodeBase<TKey, TValue>
where TKey : new(), SnapTypeBase<TKey>
where TValue : new(), SnapTypeBase<TValue>
Inheritance
Object    NodeTKey    SortedTreeNodeBaseTKey, TValue    FixedSizeNodeTKey, TValue

Type Parameters

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

Constructors

FixedSizeNodeTKey, TValue Creates a new class.

Properties

HeaderSize Gets the byte offset of the header size.
(Inherited from NodeTKey)
IsLeftSiblingIndexNull Is the index of the left sibling null, i.e., equal to MaxValue
(Inherited from NodeTKey)
IsRightSiblingIndexNull Is the index of the right sibling null, i.e., equal to MaxValue
(Inherited from NodeTKey)
LeftSiblingNodeIndex The index of the left sibling. MaxValue is the null case.
(Inherited from NodeTKey)
LowerKey The lower bounds of the node. This is an inclusive bounds and always valid.
(Inherited from NodeTKey)
MaxOverheadWithCombineNodes Gets the maximum overhead (additional space used) when combining nodes.
(Overrides SortedTreeNodeBaseTKey, TValueMaxOverheadWithCombineNodes)
NodeIndex Gets the node index of this current node.
(Inherited from NodeTKey)
NodePosition Gets the first position for the current node.
(Inherited from NodeTKey)
RecordCount Gets or sets the number of records in this node.
(Inherited from NodeTKey)
RemainingBytes Gets or sets the number of unused bytes in the node.
(Inherited from NodeTKey)
RightSiblingNodeIndex The index of the right sibling. MaxValue is the null case.
(Inherited from NodeTKey)
StartOfDataPosition The position that points to the location right after the header which is the start of the data within the node.
(Inherited from NodeTKey)
UpperKey The upper bounds of the node. This is an exclusive bounds and is valid when there is a sibling to the right. If there is no sibling to the right, it should still be valid except for the maximum key value condition.
(Inherited from NodeTKey)
ValidBytes The number of bytes that are used in this node.
(Inherited from NodeTKey)

Methods

AppendSequentialStream Appends a sequential stream of key-value pairs to the node.
(Overrides SortedTreeNodeBaseTKey, TValueAppendSequentialStream(InsertStreamHelperTKey, TValue, Boolean))
CanCombineWithSiblings Determines which sibling node that this node can be combined with.
(Inherited from SortedTreeNodeBaseTKey, TValue)
Clear Invalidates the current node.
(Inherited from NodeTKey)
Clone Creates a new instance of the same node type as a clone with the specified level.
(Overrides SortedTreeNodeBaseTKey, TValueClone(Byte))
CreateEmptyNode Creates an empty node with the specified node index.
(Inherited from NodeTKey)
CreateNewNode Creates a new node with the provided data.
(Inherited from NodeTKey)
CreateTreeScanner Returns a SortedTreeScannerBaseTKey, TValue
(Overrides SortedTreeNodeBaseTKey, TValueCreateTreeScanner)
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)
GetHashCodeServes as the default hash function.
(Inherited from Object)
GetIndexOf Searches for the index of the specified key within the node.
(Overrides SortedTreeNodeBaseTKey, TValueGetIndexOf(TKey))
GetOrGetNext Gets the provided key or the key that is directly to the right of this key.
(Inherited from SortedTreeNodeBaseTKey, TValue)
GetReadPointer Retrieves a read pointer to the current node's data.
(Inherited from NodeTKey)
GetReadPointerAfterHeader Gets a read pointer positioned immediately after the node header.
(Inherited from NodeTKey)
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValidBytes Retrieves the valid bytes count from the specified node's header.
(Inherited from NodeTKey)
GetWritePointer Retrieves a write pointer to the current node's data.
(Inherited from NodeTKey)
GetWritePointerAfterHeader Retrieves a write pointer to the data area after the node's header.
(Inherited from NodeTKey)
IncrementOneRecord Modifies both the RecordCount and ValidBytes in one function call.
(Inherited from NodeTKey)
IncrementRecordCounts Increments the record counts and valid bytes of the node by the specified amounts.
(Inherited from NodeTKey)
Initialize Initializes the required parameters for this tree to function. Must be called once.
(Inherited from SortedTreeNodeBaseTKey, TValue)
InitializeNode Initializes the node with the given binary stream and block size.
(Inherited from NodeTKey)
InitializeType Initializes the type-specific properties of the node, such as the maximum records per node.
(Overrides SortedTreeNodeBaseTKey, TValueInitializeType)
InsertUnlessFull Inserts a key-value pair at the specified index unless the node is already full.
(Overrides SortedTreeNodeBaseTKey, TValueInsertUnlessFull(Int32, TKey, TValue))
IsKeyInsideBounds Checks if the specified key falls within the bounds of this node.
(Inherited from NodeTKey)
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Read(Int32, TValue) Reads the value at the specified index in the node.
(Overrides SortedTreeNodeBaseTKey, TValueRead(Int32, TValue))
Read(Int32, TKey, TValue) Reads the key-value pair at the specified index in the node.
(Overrides SortedTreeNodeBaseTKey, TValueRead(Int32, TKey, TValue))
RemoveUnlessOverflow Removes a key-value pair at the specified index unless it would cause an overflow.
(Overrides SortedTreeNodeBaseTKey, TValueRemoveUnlessOverflow(Int32))
SeekToFirstNode Seeks to the first node at this level of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
SeekToLastNode Seeks to the last node at this level of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
SeekToLeftSibling Seeks the current node to the left sibling node. Throws an exception if the navigation fails.
(Inherited from NodeTKey)
SeekToRightSibling Seeks the current node to the right sibling node. Throws an exception if the navigation fails.
(Inherited from NodeTKey)
SetLeftSiblingProperty Sets the left sibling property of a node with the specified index to a new value.
(Inherited from NodeTKey)
SetNodeIndex Sets the node index to the specified value, updating the node's internal state.
(Inherited from NodeTKey)
Split Splits the node into two nodes and redistributes its key-value pairs.
(Overrides SortedTreeNodeBaseTKey, TValueSplit(UInt32, TKey))
ToStringReturns a string that represents the current object.
(Inherited from Object)
TransferRecordsFromLeftToRight Transfers a specified number of key-value records from the left node to the right node during a redistribution operation.
(Overrides SortedTreeNodeBaseTKey, TValueTransferRecordsFromLeftToRight(NodeTKey, NodeTKey, Int32))
TransferRecordsFromRightToLeft Transfers a specified number of key-value records from the right node to the left node during a redistribution operation.
(Overrides SortedTreeNodeBaseTKey, TValueTransferRecordsFromRightToLeft(NodeTKey, NodeTKey, Int32))
TryGet Gets the value for the provided key if it exists.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryGet2 Gets the value for the provided key if it exists.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryGetFirstRecord(TValue) Gets the first record contained in the current node of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryGetFirstRecord(TKey, TValue) Gets the first record contained in the current node of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryGetLastRecord(TValue) Gets the last record contained in the current node of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryGetLastRecord(TKey, TValue) Gets the last record contained in the current node of the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryInsert Inserts the following value to the tree if it does not exist.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryInsert2 Inserts the following value to the tree if it does not exist.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryInsertSequentialStream Attempts to insert a sequential stream of key-value pairs into the tree.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryRemove Tries to remove the specified key from the node.
(Inherited from SortedTreeNodeBaseTKey, TValue)
TryRemove2 Tries to remove the specified key from the node or performs additional actions if needed.
(Inherited from SortedTreeNodeBaseTKey, TValue)
UpdateKey Updates the key of a non-leaf node.
(Inherited from SortedTreeNodeBaseTKey, TValue)
UpdateValue Updates the value associated with a key in a non-leaf node.
(Inherited from SortedTreeNodeBaseTKey, TValue)

Events

NodeIndexChanged Occurs when the node index is changed or cleared.
(Inherited from NodeTKey)

Fields

BlockSize Block size of the node.
(Inherited from NodeTKey)
KeyMethods Custom methods for handling keys of type TKey.
(Inherited from NodeTKey)
KeySize Size of a key in bytes.
(Inherited from NodeTKey)
KeyValueSize The size in bytes of a key-value pair.
(Inherited from SortedTreeNodeBaseTKey, TValue)
Level Level of the node within the tree hierarchy.
(Inherited from NodeTKey)
SparseIndex The sparse index used for navigation.
(Inherited from SortedTreeNodeBaseTKey, TValue)
Stream Binary stream pointer used for reading and writing data.
(Inherited from NodeTKey)

See Also