Click or drag to resize

BTreeBaseKey, Value Class

Represents a collection of objects that is maintained in sorted order.
Inheritance Hierarchy

Namespace:  VelocityDb.Collection.BTree
Assembly:  VelocityDb (in VelocityDb.dll) Version: 11.1.0.0 (11.1)
Syntax
[SerializableAttribute]
public abstract class BTreeBase<Key, Value> : BTreeNode, 
	IEnumerable<Key>, IEnumerable

Type Parameters

Key
The type of key objects in this BTree
Value
The type of value objects in a BTreeMap or BTreeMapOidShort

The BTreeBaseKey, Value type exposes the following members.

Properties
  NameDescription
Public propertyComparer
Gets the VelocityDbComparer(Of Key) that is used to determine the order of the items in the sorted set
Public propertyComparisonArraySize
Gets the size of a comparison array used by this set.
Public propertyCount
Gets the number of elements in the set.
Public propertyDepth
Gets the depth of the BTreeSet
Public propertyFlushIfPageFull
We don't want to flush other BTree pages while looking for a placement page
(Overrides OptimizedPersistableFlushIfPageFull.)
Public propertyGetAlternateComparer
If comparer isn't set then if Key type is string use SessionBase.DefaultStringComparer or ...
Public propertyIsLeaf
Is the root a leaf node or not?
Public propertyKeyPlacement
Set the key placement to be used for all key objects added to this. This setting is not persisted, it is mainly to be used with objects added with AddFast(Key)
Public propertyNodeSize
The size of the nodeList or the keyList (if depth is 1) of the root node.
Public propertyObjectsPerPage
Limit to 1000 per page (instead of default 40000)
(Overrides OptimizedPersistableObjectsPerPage.)
Public propertyToDoBatchAddCount
Gets the number of objects that are not yet added to the collection
Public propertyTransientBatchSize
Get/Set the max batch size used in API such as AddFast(Key)
Public propertyUsesOidShort
Does this BTree use short object references (32 bit) for its internal references?
Top
Methods
  NameDescription
Public methodAdd(Key)
Adds an element to the set and returns a value that indicates if it was successfully added
Public methodAdd(Key, Value)
Add a key with an associated value to a BTreeMap
Public methodAdd(Key, Value, Byte)
Adds a key and value to the map and returns a value that indicates if it was successfully added
Public methodAddFast
Adds an element to an array of to be added objects. The objects in this array are added when a call toFlushTransients is triggered by multiple events such as calling Count and when collection is committed and/or flushed to disk or when the array is full. The array size is by default currently BTreeAddFastTransientBatchSize but you can get/set the desired size with TransientBatchSize
Public methodAddWithComparisonArray
Adds an element to the set and returns a value that indicates if it was successfully added
Public methodClear
Removes all elements from the set.
Public methodContains(Key)
Determines whether the set contains a specific element.
Public methodContains(Key, Byte)
Determines whether the set contains a specific element.
Public methodCopyTo
Copies a range of elements from the BTreeBase to a compatible one-dimensional array, starting at the specified index of the target array.
Public methodFlushTransients
Adds all queued up to be added objects after presorting them transiently
(Overrides OptimizedPersistableFlushTransients.)
Public methodGetEnumerator
Enumerates all contained Key objects in sorted order
Public methodGetKeyId(Key)
When Key type implements IOptimizedPersistable, you can use this function to get the Id of the persistent object instead of the entire object. Use for performance reasons in certain cases where reading the object isn't desired. To avoid opening the object, a comparison array which is flagged as complete key must be used.
Public methodGetKeyId(Key, Byte)
When Key type implements IOptimizedPersistable, you can use this function to get the Id of the persistent object instead of the entire object. Use for performance reasons in certain cases where reading the object isn't desired. To avoid opening the object, a comparison array which is flagged as complete key must be used.
Public methodInitializeAfterRead
Sets up some transient variables
(Overrides OptimizedPersistableInitializeAfterRead(SessionBase).)
Public methodInitializeAfterRecreate
This function is called when an object has been read from disk before all data members (fields) have been fully loaded. Override this to provide your own initializations of transient data.
(Overrides OptimizedPersistableInitializeAfterRecreate(SessionBase).)
Public methodInitNew
Internal use only
Public methodIterator
Initializes an iterator to find the keys of this set
Public methodRemove(Key)
Removes a specified item from the set.
Public methodRemove(Key, Byte)
Removes a specified item from the set.
Public methodSearchTransients
Public methodTryGetKey(Key, Key)
Gets the value matching persistent key with the specified key.
Public methodTryGetKey(Key, Byte, Key)
Gets the value associated with the specified key.
Top
Extension Methods
  NameDescription
Public Extension MethodToStringDetails(SessionBase, Boolean)Overloaded.
Object details as a string
(Defined by Utilities.)
Public Extension MethodToStringDetails(Schema, TypeVersion, Boolean)Overloaded.
Currently only used by Database Manager
(Defined by Utilities.)
Top
See Also