OPIC
Object Persistence In C
|
Data Structures | |
struct | OPHashTable |
An opaque object that manage associations of fixed length key-value pairs. More... | |
struct | HTFunnel |
An opaque object for doing massive update or quries on OPHashTable. More... | |
struct | PascalHashTable |
An opaque object that manages associations of key-value pairs. More... | |
Typedefs | |
typedef void(* | OPHashIterator) (void *key, void *value, size_t keysize, size_t valsize, void *context) |
HashTable iterator interface. More... | |
typedef void(* | OPFunnelUpsertCB) (void *key, void *table_value, void *funnel_value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize, bool is_duplicate) |
Callback type for doing upsert operation with funnel. More... | |
typedef void(* | OPFunnelGetCB) (void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize) |
Callback type for doing get operation with funnel. More... | |
typedef void(* | OPFunnelDeleteCB) (void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize) |
Callback type for doing delete operation with funnel. More... | |
typedef uint64_t(* | OPHash) (void *key, size_t size) |
Hash function interface. More... | |
Functions | |
static uint64_t | OPDefaultHash (void *key, size_t size) |
Default hash function. More... | |
typedef void(* OPHashIterator) (void *key, void *value, size_t keysize, size_t valsize, void *context) |
#include <opic/hash/op_hash.h>
HashTable iterator interface.
key | pointer to key |
value | pointer to value |
keysize | length of the key |
valsize | length of the value |
context | user defined context |
typedef void(* OPFunnelUpsertCB) (void *key, void *table_value, void *funnel_value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize, bool is_duplicate) |
#include <opic/hash/op_hash.h>
Callback type for doing upsert operation with funnel.
key | The key upserting to hash table |
table_value | The value in table (old value). |
funnel_value | The value in funnel (new value). |
ctx | User defined context. |
keysize | Size of the key. |
valsize | Both table_value and funnel_value has same size valsize. |
ctxsize | Size of the context. |
is_duplicate | True when this upsert operation is on a duplicate key (update case). False when this key is newly inserted. |
typedef void(* OPFunnelGetCB) (void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize) |
#include <opic/hash/op_hash.h>
Callback type for doing get operation with funnel.
key | The key upserting to hash table |
value | The value in table. |
ctx | User defined context. |
keysize | Size of the key. |
valsize | Size of the value. |
ctxsize | Size of the context. |
typedef void(* OPFunnelDeleteCB) (void *key, void *value, void *ctx, size_t keysize, size_t valsize, size_t ctxsize) |
#include <opic/hash/op_hash.h>
Callback type for doing delete operation with funnel.
key | The key upserting to hash table |
value | The value in table. |
ctx | User defined context. |
keysize | Size of the key. |
valsize | Size of the value. |
ctxsize | Size of the context. |
OPHash |
#include <opic/hash/op_hash.h>
Hash function interface.
key | pointer to the key |
size | size of the key |
|
inlinestatic |