OpenSDN source code
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
zookeeper::client::impl::ZookeeperClientImpl Class Reference

#include <zookeeper_client_impl.h>

Collaboration diagram for zookeeper::client::impl::ZookeeperClientImpl:

Public Member Functions

 ZookeeperClientImpl (const char *hostname, const char *servers, zookeeper::interface::ZookeeperInterface *zki)
 
virtual ~ZookeeperClientImpl ()
 
bool Connect ()
 
void Shutdown ()
 
bool Reconnect ()
 
bool IsConnected () const
 
bool CreateNode (const char *path, const char *value, int flag)
 
bool DeleteNode (const char *path)
 
int CreateNodeSync (const char *path, const char *value, int *err, int flag)
 
int GetNodeDataSync (const char *path, char *buf, int *buf_len, int *err)
 
int DeleteNodeSync (const char *path, int *err)
 
bool CheckNodeExist (const char *path)
 
void SetClient (void *client)
 
void * GetClient ()
 
std::string Name () const
 

Private Attributes

std::string hostname_
 
std::string servers_
 
zhandle_t * zk_handle_
 
bool connected_
 
void * client_
 
std::unique_ptr
< zookeeper::interface::ZookeeperInterface
zki_
 

Static Private Attributes

static const int kSessionTimeoutMSec_ = 60000
 

Detailed Description

Definition at line 19 of file zookeeper_client_impl.h.

Constructor & Destructor Documentation

zookeeper::client::impl::ZookeeperClientImpl::ZookeeperClientImpl ( const char *  hostname,
const char *  servers,
zookeeper::interface::ZookeeperInterface zki 
)

Definition at line 96 of file zookeeper_client.cc.

zookeeper::client::impl::ZookeeperClientImpl::~ZookeeperClientImpl ( )
virtual

Definition at line 107 of file zookeeper_client.cc.

Member Function Documentation

bool zookeeper::client::impl::ZookeeperClientImpl::CheckNodeExist ( const char *  path)

Definition at line 233 of file zookeeper_client.cc.

Here is the call graph for this function:

bool zookeeper::client::impl::ZookeeperClientImpl::Connect ( )

Definition at line 110 of file zookeeper_client.cc.

Here is the call graph for this function:

bool zookeeper::client::impl::ZookeeperClientImpl::CreateNode ( const char *  path,
const char *  value,
int  flag 
)

Definition at line 195 of file zookeeper_client.cc.

Here is the call graph for this function:

int zookeeper::client::impl::ZookeeperClientImpl::CreateNodeSync ( const char *  path,
const char *  value,
int *  err,
int  flag 
)

Definition at line 176 of file zookeeper_client.cc.

Here is the call graph for this function:

bool zookeeper::client::impl::ZookeeperClientImpl::DeleteNode ( const char *  path)

Definition at line 264 of file zookeeper_client.cc.

Here is the call graph for this function:

int zookeeper::client::impl::ZookeeperClientImpl::DeleteNodeSync ( const char *  path,
int *  err 
)

Definition at line 247 of file zookeeper_client.cc.

Here is the call graph for this function:

void* zookeeper::client::impl::ZookeeperClientImpl::GetClient ( )
inline

Definition at line 36 of file zookeeper_client_impl.h.

int zookeeper::client::impl::ZookeeperClientImpl::GetNodeDataSync ( const char *  path,
char *  buf,
int *  buf_len,
int *  err 
)

Definition at line 215 of file zookeeper_client.cc.

Here is the call graph for this function:

bool zookeeper::client::impl::ZookeeperClientImpl::IsConnected ( ) const

Definition at line 163 of file zookeeper_client.cc.

std::string zookeeper::client::impl::ZookeeperClientImpl::Name ( ) const

Definition at line 285 of file zookeeper_client.cc.

bool zookeeper::client::impl::ZookeeperClientImpl::Reconnect ( )

Definition at line 158 of file zookeeper_client.cc.

Here is the call graph for this function:

void zookeeper::client::impl::ZookeeperClientImpl::SetClient ( void *  client)
inline

Definition at line 35 of file zookeeper_client_impl.h.

void zookeeper::client::impl::ZookeeperClientImpl::Shutdown ( void  )

Definition at line 145 of file zookeeper_client.cc.

Member Data Documentation

void* zookeeper::client::impl::ZookeeperClientImpl::client_
private

Definition at line 46 of file zookeeper_client_impl.h.

bool zookeeper::client::impl::ZookeeperClientImpl::connected_
private

Definition at line 45 of file zookeeper_client_impl.h.

std::string zookeeper::client::impl::ZookeeperClientImpl::hostname_
private

Definition at line 42 of file zookeeper_client_impl.h.

const int zookeeper::client::impl::ZookeeperClientImpl::kSessionTimeoutMSec_ = 60000
staticprivate

Definition at line 40 of file zookeeper_client_impl.h.

std::string zookeeper::client::impl::ZookeeperClientImpl::servers_
private

Definition at line 43 of file zookeeper_client_impl.h.

zhandle_t* zookeeper::client::impl::ZookeeperClientImpl::zk_handle_
private

Definition at line 44 of file zookeeper_client_impl.h.

std::unique_ptr<zookeeper::interface::ZookeeperInterface> zookeeper::client::impl::ZookeeperClientImpl::zki_
private

Definition at line 47 of file zookeeper_client_impl.h.


The documentation for this class was generated from the following files: