skip_list_handler.h
Go to the documentation of this file.
1 /******************************************************************************/
35 /******************************************************************************/
36 #if !defined(SKIP_LIST_HANDLER_H_)
37 #define SKIP_LIST_HANDLER_H_
38 
39 #if defined(__cplusplus)
40 extern "C" {
41 #endif
42 
43 #include "skip_list_types.h"
44 #include "skip_list.h"
45 
57 void
60 );
61 
76  ion_key_t key,
77  ion_value_t value
78 );
79 
106 ion_err_t
109  ion_key_type_t key_type,
110  ion_key_size_t key_size,
111  ion_value_size_t value_size,
112  ion_dictionary_size_t dictionary_size,
113  ion_dictionary_compare_t compare,
114  ion_dictionary_handler_t *handler,
116 );
117 
131  ion_key_t key
132 );
133 
141 ion_err_t
144 );
145 
152 ion_err_t
155 );
156 
174  ion_key_t key,
175  ion_value_t value
176 );
177 
178 #if defined(__cplusplus)
179 }
180 #endif
181 
182 #endif /* SKIP_LIST_HANDLER_H_ */
ion_err_t sldict_delete_dictionary(ion_dictionary_t *dictionary)
Deletes an instance of a dictionary and its associated data.
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_status_t sldict_insert(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Inserts a key and value pair into the dictionary.
ion_status_t sldict_delete(ion_dictionary_t *dictionary, ion_key_t key)
Deletes the key and associated value from the given dictionary instance.
int ion_value_size_t
The size (length) of a dictionary value in bytes.
Definition: kv_system.h:256
void sldict_init(ion_dictionary_handler_t *handler)
Registers a skiplist handler to a dictionary instance.
unsigned int ion_dictionary_id_t
A type used to identify dictionaries, specifically in the master table.
unsigned int ion_dictionary_size_t
The implementation specific size of the dictionary.
Definition: kv_system.h:264
Contains all types local to the skiplist data structure.
#define key(k)
Definition: bpp_tree.c:75
char(* ion_dictionary_compare_t)(ion_key_t, ion_key_t, ion_key_size_t)
Function pointer type for dictionary comparison methods.
char ion_err_t
The error type used to store error codes.
Definition: kv_system.h:226
void * ion_key_t
A dictionary key.
Definition: kv_system.h:241
void * ion_value_t
A dictionary value.
Definition: kv_system.h:246
A dictionary contains information regarding an instance of the storage element and the associated han...
ion_err_t sldict_create_dictionary(ion_dictionary_id_t id, ion_key_type_t key_type, ion_key_size_t key_size, ion_value_size_t value_size, ion_dictionary_size_t dictionary_size, ion_dictionary_compare_t compare, ion_dictionary_handler_t *handler, ion_dictionary_t *dictionary)
Creates an instance of a dictionary.
ion_status_t sldict_update(ion_dictionary_t *dictionary, ion_key_t key, ion_value_t value)
Updates the value stored at a given key.
ion_err_t sldict_destroy_dictionary(ion_dictionary_id_t id)
Deletes an instance of a closed dictionary.
Implementation of a Skiplist data store.
int ion_key_size_t
The size (length) of a dictionary key in bytes.
Definition: kv_system.h:251
A dictionary_handler is responsible for dealing with the specific interface for an underlying diction...
A status object that describes the result of a dictionary operation.
Definition: kv_system.h:290