NodeTKey Class

Contains basic data about a node in the SortedTree.

Definition

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

Type Parameters

TKey
The key that the SortedTree contains.

Constructors

NodeTKey(Byte) Initializes a new instance of the NodeTKey class with the specified level.
NodeTKey(BinaryStreamPointerBase, Int32, Byte) Initializes a new instance of the NodeTKey class by reading node data from the specified stream.

Properties

HeaderSize Gets the byte offset of the header size.
IsLeftSiblingIndexNull Is the index of the left sibling null, i.e., equal to MaxValue
IsRightSiblingIndexNull Is the index of the right sibling null, i.e., equal to MaxValue
LeftSiblingNodeIndex The index of the left sibling. MaxValue is the null case.
LowerKey The lower bounds of the node. This is an inclusive bounds and always valid.
NodeIndex Gets the node index of this current node.
NodePosition Gets the first position for the current node.
RecordCount Gets or sets the number of records in this node.
RemainingBytes Gets or sets the number of unused bytes in the node.
RightSiblingNodeIndex The index of the right sibling. MaxValue is the null case.
StartOfDataPosition The position that points to the location right after the header which is the start of the data within the node.
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.
ValidBytes The number of bytes that are used in this node.

Methods

Clear Invalidates the current node.
CreateEmptyNode Creates an empty node with the specified node index.
CreateNewNode Creates a new node with the provided data.
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)
GetReadPointer Retrieves a read pointer to the current node's data.
GetReadPointerAfterHeader Gets a read pointer positioned immediately after the node header.
GetTypeGets the Type of the current instance.
(Inherited from Object)
GetValidBytes Retrieves the valid bytes count from the specified node's header.
GetWritePointer Retrieves a write pointer to the current node's data.
GetWritePointerAfterHeader Retrieves a write pointer to the data area after the node's header.
IncrementOneRecord Modifies both the RecordCount and ValidBytes in one function call.
IncrementRecordCounts Increments the record counts and valid bytes of the node by the specified amounts.
InitializeNode Initializes the node with the given binary stream and block size.
IsKeyInsideBounds Checks if the specified key falls within the bounds of this node.
MemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
SeekToLeftSibling Seeks the current node to the left sibling node. Throws an exception if the navigation fails.
SeekToRightSibling Seeks the current node to the right sibling node. Throws an exception if the navigation fails.
SetLeftSiblingProperty Sets the left sibling property of a node with the specified index to a new value.
SetNodeIndex Sets the node index to the specified value, updating the node's internal state.
ToStringReturns a string that represents the current object.
(Inherited from Object)

Events

NodeIndexChanged Occurs when the node index is changed or cleared.

Fields

BlockSize Block size of the node.
IndexSize The size in bytes of an index value within the node's header.
KeyMethods Custom methods for handling keys of type TKey.
KeySize Size of a key in bytes.
Level Level of the node within the tree hierarchy.
OffsetOfLeftSibling Offset within a node's header where the left sibling node's index is stored.
OffsetOfLowerBounds Offset within a node's header where the lower bounds of the node are stored.
OffsetOfNodeLevel Offset within a node's header where the level of the node is stored.
OffsetOfRecordCount Offset within a node's header where the record count is stored.
OffsetOfRightSibling Offset within a node's header where the right sibling node's index is stored.
OffsetOfValidBytes Offset within a node's header where the number of valid bytes is stored.
OffsetOfVersion Offset within a node's header where the version information is stored.
Stream Binary stream pointer used for reading and writing data.

See Also