5 #ifndef ZOOKEEPER_ZOOKEEPER_INTERFACE_H_
6 #define ZOOKEEPER_ZOOKEEPER_INTERFACE_H_
8 #include <zookeeper/zookeeper.h>
17 virtual zhandle_t*
ZookeeperInit(
const char *host, watcher_fn fn,
18 int recv_timeout,
const clientid_t *clientid,
void *context,
21 virtual int ZooState(zhandle_t *zh) = 0;
22 virtual int ZooCreate(zhandle_t *zh,
const char *path,
const char *value,
23 int valuelen,
const struct ACL_vector *acl,
int flags,
24 char *path_buffer,
int path_buffer_len) = 0;
26 virtual int ZooGet(zhandle_t *zh,
const char *path,
int watch,
27 char *buffer,
int* buffer_len,
struct Stat *stat) = 0;
28 virtual int ZooExists(zhandle_t *zh,
const char *path,
int watch,
29 struct Stat *stat) = 0;
30 virtual void ZooSetContext(zhandle_t * zh,
void *context) = 0;
37 #endif // ZOOKEEPER_ZOOKEEPER_INTERFACE_H_
virtual int ZooDelete(zhandle_t *zh, const char *path, int version)=0
virtual int ZooCreate(zhandle_t *zh, const char *path, const char *value, int valuelen, const struct ACL_vector *acl, int flags, char *path_buffer, int path_buffer_len)=0
virtual void ZooSetContext(zhandle_t *zh, void *context)=0
virtual void ZooSetDebugLevel(ZooLogLevel logLevel)=0
virtual int ZooIsUnrecoverable(zhandle_t *zh)=0
virtual int ZooExists(zhandle_t *zh, const char *path, int watch, struct Stat *stat)=0
virtual int ZooState(zhandle_t *zh)=0
virtual zhandle_t * ZookeeperInit(const char *host, watcher_fn fn, int recv_timeout, const clientid_t *clientid, void *context, int flags)=0
virtual ~ZookeeperInterface()
virtual int ZookeeperClose(zhandle_t *zh)=0
virtual int ZooGet(zhandle_t *zh, const char *path, int watch, char *buffer, int *buffer_len, struct Stat *stat)=0