skip_list.h
Go to the documentation of this file.
ion_status_t sl_update(ion_skiplist_t *skiplist, ion_key_t key, ion_value_t value)
Updates the value stored at key with the new value.
Definition: skip_list.c:225
enum ION_KEY_TYPE ion_key_type_t
This is the available key types for ION_DB. All types will be based on system defines.
ion_sl_node_t * sl_find_node(ion_skiplist_t *skiplist, ion_key_t key)
Searches for a node with the given key. Used in conjunction with sl_query to perform key lookups...
Definition: skip_list.c:317
Struct of the Skiplist, holds metadata and the entry point into the skiplist.
Definition: skip_list_types.h:67
ion_err_t sl_initialize(ion_skiplist_t *skiplist, ion_key_type_t key_type, int key_size, int value_size, int maxheight, int pnum, int pden)
Initializes an in-memory skiplist.
Definition: skip_list.c:41
ion_status_t sl_delete(ion_skiplist_t *skiplist, ion_key_t key)
Attempts to delete all key/value pairs stored at the given key.
Definition: skip_list.c:261
ion_sl_level_t sl_gen_level(ion_skiplist_t *skiplist)
Generates a psuedo-random height, bounded within [0, maxheight). The generator is seeded using the cu...
Definition: skip_list.c:340
Contains all types local to the skiplist data structure.
void print_skiplist(ion_skiplist_t *skiplist)
Iterates through each level of a skiplist and prints out the content of each node in a meaningful way...
Definition: skip_list.c:353
ion_err_t sl_destroy(ion_skiplist_t *skiplist)
Destroys the skiplist in memory.
Definition: skip_list.c:95
ion_status_t sl_get(ion_skiplist_t *skiplist, ion_key_t key, ion_value_t value)
Requests the value stored at the given key.
Definition: skip_list.c:206
ion_status_t sl_insert(ion_skiplist_t *skiplist, ion_key_t key, ion_value_t value)
Inserts a key value pair into the skiplist.
Definition: skip_list.c:115
A status object that describes the result of a dictionary operation.
Definition: kv_system.h:290