nmdb.h File Reference

#include <stdlib.h>
Include dependency graph for nmdb.h:

Go to the source code of this file.

Typedefs

typedef struct nmdb_conn nmdb_t
 Opaque type representing a connection with one or more servers.

Functions

nmdb_tnmdb_init ()
 Create a new nmdb_t pointer, used to talk with the server.
int nmdb_add_tipc_server (nmdb_t *db, int port)
 Add a TIPC server.
int nmdb_add_tcp_server (nmdb_t *db, const char *addr, int port)
 Add a TCP server.
int nmdb_add_udp_server (nmdb_t *db, const char *addr, int port)
 Add an UDP server.
int nmdb_add_sctp_server (nmdb_t *db, const char *addr, int port)
 Add a SCTP server.
int nmdb_free (nmdb_t *db)
 Free a nmdb_t structure created by nmdb_init().
ssize_t nmdb_get (nmdb_t *db, const unsigned char *key, size_t ksize, unsigned char *val, size_t vsize)
 Get the value associated with a key.
ssize_t nmdb_cache_get (nmdb_t *db, const unsigned char *key, size_t ksize, unsigned char *val, size_t vsize)
 Get the value associated with a key from cache.
int nmdb_set (nmdb_t *db, const unsigned char *key, size_t ksize, const unsigned char *val, size_t vsize)
 Set the value associated with a key.
int nmdb_set_sync (nmdb_t *db, const unsigned char *key, size_t ksize, const unsigned char *val, size_t vsize)
 Set the value associated with a key, synchronously.
int nmdb_cache_set (nmdb_t *db, const unsigned char *key, size_t ksize, const unsigned char *val, size_t vsize)
 Set the value associated with a key, but only in the cache.
int nmdb_del (nmdb_t *db, const unsigned char *key, size_t ksize)
 Delete a key.
int nmdb_del_sync (nmdb_t *db, const unsigned char *key, size_t ksize)
 Delete a key synchronously.
int nmdb_cache_del (nmdb_t *db, const unsigned char *key, size_t ksize)
 Delete a key, but only from the cache.
int nmdb_cas (nmdb_t *db, const unsigned char *key, size_t ksize, const unsigned char *oldval, size_t ovsize, const unsigned char *newval, size_t nvsize)
 Perform an atomic compare-and-swap.
int nmdb_cache_cas (nmdb_t *db, const unsigned char *key, size_t ksize, const unsigned char *oldval, size_t ovsize, const unsigned char *newval, size_t nvsize)
 Perform an atomic compare-and-swap only on the cache.
int nmdb_incr (nmdb_t *db, const unsigned char *key, size_t ksize, int64_t increment, int64_t *newval)
 Atomically increment the value associated with a key.
int nmdb_cache_incr (nmdb_t *db, const unsigned char *key, size_t ksize, int64_t increment, int64_t *newval)
 Atomically increment the value associated with a key only in the cache.
ssize_t nmdb_firstkey (nmdb_t *db, unsigned char *key, size_t ksize)
 Get the first key.
ssize_t nmdb_nextkey (nmdb_t *db, const unsigned char *key, size_t ksize, unsigned char *newkey, size_t nksize)
 Get the key that follows the one given.
int nmdb_stats (nmdb_t *db, unsigned char *buf, size_t bsize, unsigned int *nservers, unsigned int *nstats)
 Request servers' statistics.

Typedef Documentation

typedef struct nmdb_conn nmdb_t

Opaque type representing a connection with one or more servers.

Definition at line 10 of file nmdb.h.

Generated on Sun Oct 10 19:50:36 2010 for libnmdb (public) by  doxygen 1.6.3