OpenSDN source code
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::ZookeeperInterfacezki_
 

Static Private Attributes

static const int kSessionTimeoutMSec_ = 60000
 

Detailed Description

Definition at line 19 of file zookeeper_client_impl.h.

Constructor & Destructor Documentation

◆ ZookeeperClientImpl()

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

Definition at line 96 of file zookeeper_client.cc.

◆ ~ZookeeperClientImpl()

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

Definition at line 107 of file zookeeper_client.cc.

Member Function Documentation

◆ CheckNodeExist()

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:

◆ Connect()

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

Definition at line 110 of file zookeeper_client.cc.

Here is the call graph for this function:

◆ CreateNode()

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:

◆ CreateNodeSync()

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:

◆ DeleteNode()

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:

◆ DeleteNodeSync()

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:

◆ GetClient()

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

Definition at line 36 of file zookeeper_client_impl.h.

◆ GetNodeDataSync()

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:

◆ IsConnected()

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

Definition at line 163 of file zookeeper_client.cc.

◆ Name()

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

Definition at line 285 of file zookeeper_client.cc.

◆ Reconnect()

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

Definition at line 158 of file zookeeper_client.cc.

Here is the call graph for this function:

◆ SetClient()

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

Definition at line 35 of file zookeeper_client_impl.h.

◆ Shutdown()

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

Definition at line 145 of file zookeeper_client.cc.

Member Data Documentation

◆ client_

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

Definition at line 46 of file zookeeper_client_impl.h.

◆ connected_

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

Definition at line 45 of file zookeeper_client_impl.h.

◆ hostname_

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

Definition at line 42 of file zookeeper_client_impl.h.

◆ kSessionTimeoutMSec_

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

Definition at line 40 of file zookeeper_client_impl.h.

◆ servers_

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

Definition at line 43 of file zookeeper_client_impl.h.

◆ zk_handle_

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

Definition at line 44 of file zookeeper_client_impl.h.

◆ zki_

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: