Reference Guide C API www.spreadconcepts.com


Programmer's Reference Guide
Replicated Hash Table
Version 2.0


#include <rht.h>

Library Operations
rht_code rht_lib_init(void);
const char *rht_strerror(rht_code err);

Dictionary Operations
rht_code rht_create(rht_options o, rht *r, rht_name *rpn);
rht_code rht_fini(rht r, int flags);
rht_code rht_error(rht r, rht_code *err_ptr, int flags);
rht_code rht_size(rht r, size_t *sz, int flags);
rht_code rht_put(rht r, rht_blob k, rht_blob v, int flags);
rht_code rht_get(rht r, rht_blob k, rht_pair **p, int flags);
rht_code rht_del(rht r, rht_blob k, int flags);
rht_code rht_snapshot(rht r, rht_snap *snap, int flags);

Local-Lock Dictionary Operations
rht_code rht_grab(rht r, int flags);
rht_code rht_drop(rht r, int flags);
rht_code rht_is_owner(rht r, long *grab_cnt);
rht_code rht_get_it(rht r, rht_blob key, rht_it *i);
rht_code rht_begin(rht r, rht_it *i);
rht_code rht_end(rht r, rht_it *i);

Key-Value Pair Operations
void rht_pair_fini(rht_pair *p);
rht_update_type rht_pair_update_type(const rht_pair *p);
rht_blob rht_pair_key(const rht_pair *p);
rht_blob rht_pair_val(const rht_pair *p);
rht_stamp rht_pair_time_stamp(const rht_pair *p);

Snapshot Operations
void rht_snap_fini(rht_snap *snap);
size_t rht_snap_size(const rht_snap *snap);
rht_it *rht_snap_begin(const rht_snap *snap, rht_it *i);
rht_it *rht_snap_end(const rht_snap *snap, rht_it *i);
rht_it *rht_snap_get_it(const rht_snap *snap, rht_blob k, rht_it *i);

Iterator Operations
rht_update_type rht_it_update_type(const rht_it *i);
rht_blob rht_it_key(const rht_it *i);
rht_blob rht_it_val(const rht_it *i);
rht_stamp rht_it_time_stamp(const rht_it *i);
su_bool rht_it_eq(const rht_it *i1, const rht_it *i2);
rht_it *rht_it_next(rht_it *i);

Name and Name Set Operations
int rht_name_cmp(const rht_name *n1, const rht_name *n2);
size_t rht_nset_size(const rht_nset *s);
su_bool rht_nset_contains(const rht_nset *s, const rht_name *n);
rht_nset_it *rht_nset_begin(const rht_nset *s, rht_nset_it *i);
rht_nset_it *rht_nset_end(const rht_nset *s, rht_nset_it *i);
rht_nset_it *rht_nset_get_it(const rht_nset *s, const rht_name *n, rht_nset_it *i);
const rht_name *rht_nset_it_val(const rht_nset_it *i);
rht_nset_it *rht_nset_it_next(rht_nset_it *i);
su_bool rht_nset_it_eq(const rht_nset_it *i1, const rht_nset_it *i2);



Copyright © 2004, Spread Concepts LLC, All rights reserved