sds_bptree_instance - Man Page
Synopsis
#include <sds.h>
Data Fields
uint32_t checksum
uint16_t offline_checksumming
uint16_t search_checksumming
uint16_t print_iter
sds_bptree_node * root
void(* value_free_fn )(void *value)
void *(* value_dup_fn )(void *value)
int64_t(* key_cmp_fn )(void *a, void *b)
void(* key_free_fn )(void *key)
void *(* key_dup_fn )(void *key)
Detailed Description
The instance of the B+Tree. Stores references to function pointers for manipulation of keys and values within the tree. Maintains the root checksum which estabilshes the 'root of trust' to all other nodes in the tree.
Field Documentation
uint32_t sds_bptree_instance::checksum
checksum of the instance data.
int64_t(* sds_bptree_instance::key_cmp_fn) (void *a, void *b)
Key comparison function. This must return an int64_t of the difference in the values. A result of < 0 indicates that a is less than b. A result of 0 indicates that the values of a and b are identical. A result of > 0 indicates that a is greater than b.
void *(* sds_bptree_instance::key_dup_fn) (void *key)
Key duplication function. This duplicates the value of key and returns a new pointer to it. This is used extensively in the tree structure, and the key or result may be freed out of order, so don't blindly return the same data.
void(* sds_bptree_instance::key_free_fn) (void *key)
Key free function. This must free the pointer provided by key.
uint16_t sds_bptree_instance::offline_checksumming
This flag determines if we maintain and update checksum values during tree operations, and that we verify these during the verification operation.
uint16_t sds_bptree_instance::print_iter
Internal tracking id for tree display.
sds_bptree_node* sds_bptree_instance::root
Pointer to the current tree root node.
uint16_t sds_bptree_instance::search_checksumming
This flag determines if we verify all checksums during the read and write paths of the code. Adds a large performance overhead, but guarantees the data in the tree is 'consistent'.
void *(* sds_bptree_instance::value_dup_fn) (void *value)
This function should be able to duplicate value of the type that will be inserted into the tree. Values may be freed and duplicated in an order you do not expect, so blindly returning a pointer to the same data may not be wise if free then destroys it.
void(* sds_bptree_instance::value_free_fn) (void *value)
This function should be able to free values of the type that will be inserted into the tree.
Author
Generated automatically by Doxygen for dirsrv from the source code.