Sophie

Sophie

distrib > Mageia > 1 > i586 > by-pkgid > e5bf9ab66a4908454e5af29eddbd2c29 > files > 40

libzookeeper-devel-3.2.1-1.mga1.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>zookeeper-3.2.1: include/zookeeper.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<!-- Generated by Doxygen 1.7.3 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">zookeeper-3.2.1</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Defines</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<h1>include/zookeeper.h File Reference</h1>  </div>
</div>
<div class="contents">

<p>ZooKeeper functions and definitions.  
<a href="#_details">More...</a></p>
<div class="textblock"><div class="dynheader">
Include dependency graph for zookeeper.h:</div>
<div class="dyncontent">
<div class="center"><img src="zookeeper_8h__incl.png" border="0" usemap="#include_2zookeeper_8h" alt=""/></div>
<map name="include_2zookeeper_8h" id="include_2zookeeper_8h">
</map>
</div>
</div>
<p><a href="zookeeper_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structclientid__t.html">clientid_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">client id structure.  <a href="structclientid__t.html#_details">More...</a><br/></td></tr>
<tr><td colspan="2"><h2><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef struct _zhandle&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">ZooKeeper handle.  <a href="#abbb713010da1056bae16baf23495d3ca"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> )(<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, int type, int state, const char *path, void *watcherCtx)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a watch function.  <a href="#a3c087870022121ef51dd2e7c43c7cd39"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a> )(int rc, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function for a call that returns void.  <a href="#ae0c602c3bb94988ef46d0428211db49a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a> )(int rc, const struct Stat *stat, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function that returns a Stat structure.  <a href="#a261bdb8998c8de8b96b333fa06a2b831"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a> )(int rc, const char *value, int value_len, const struct Stat *stat, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function that returns data.  <a href="#a2eaedcd3874b449281020b66aa27f239"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a> )(int rc, const struct String_vector *strings, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function that returns a list of strings.  <a href="#a151bfd8a6bd8b25c43e8c2c3275b9546"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a> )(int rc, const char *value, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function that returns a list of strings.  <a href="#acc042bba1f47cee718330179bd613ac1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">typedef void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ab0273881ddd7eea98d98637b2137a2c8">acl_completion_t</a> )(int rc, struct ACL_vector *acl, struct Stat *stat, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">signature of a completion function that returns an ACL.  <a href="#ab0273881ddd7eea98d98637b2137a2c8"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4c">ZOO_ERRORS</a> { <br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca9677bf3e4face8afd292d31ecfd4dc5d">ZOK</a> =  0, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca7c58662f7e5b1427aa3ad1bf979681e7">ZSYSTEMERROR</a> =  -1, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca9eabb281ab14c74db3aff9ab456fa7fe">ZRUNTIMEINCONSISTENCY</a> =  -2, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca138188b6639b2a7ebe2d0e4e6555dad8">ZDATAINCONSISTENCY</a> =  -3, 
<br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4caeb234e9a730fbad7f49e43349f22f4a1">ZCONNECTIONLOSS</a> =  -4, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca68f884a7beb9b023ccc6f675a0c04c84">ZMARSHALLINGERROR</a> =  -5, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca59dbde4876cf39d0cb855749712375af">ZUNIMPLEMENTED</a> =  -6, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca09e4dce97bd35812cd4340f92bfc56f2">ZOPERATIONTIMEOUT</a> =  -7, 
<br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4cacf4f43d3a9aa644ce0d6fde3b466aed8">ZBADARGUMENTS</a> =  -8, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca5ba3d8e81d105c45f9cca8475eff9dbf">ZINVALIDSTATE</a> =  -9, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4cac22fcec5daf479703b045288a13afa67">ZAPIERROR</a> =  -100, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca18572f341d99957f2f95ccab2275c68f">ZNONODE</a> =  -101, 
<br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca3930a0c2aae1bdca49bdd440c9405c00">ZNOAUTH</a> =  -102, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca37873fe49b1e08eec5753b5e45269a2c">ZBADVERSION</a> =  -103, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4caa11331b98571065cff0c901003b05722">ZNOCHILDRENFOREPHEMERALS</a> =  -108, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca1160268179c369d39072d98b4449409f">ZNODEEXISTS</a> =  -110, 
<br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca66f5ea514ccddfa39127db1f7021720a">ZNOTEMPTY</a> =  -111, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca98d749ce49260dcf034143e03836ff91">ZSESSIONEXPIRED</a> =  -112, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4cac991a5a3b3617e683710fa6f10ef6b08">ZINVALIDCALLBACK</a> =  -113, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca0d5cdb15d20f814666d4876ba34e20d9">ZINVALIDACL</a> =  -114, 
<br/>
&#160;&#160;<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca77f3c8167bb517e34acdfc31d82823f5">ZAUTHFAILED</a> =  -115, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4cace82a8a5ecabd1ef86a6b7d9baf8904d">ZCLOSING</a> =  -116, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca0bc307f70db60743e87a6d8947a26fd4">ZNOTHING</a> =  -117, 
<a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca939cb9081488159221135f097bb453f5">ZSESSIONMOVED</a> =  -118
<br/>
 }</td></tr>
<tr><td colspan="2"><div class="groupHeader">Debug levels</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>ZooLogLevel</b> { <b>ZOO_LOG_LEVEL_ERROR</b> = 1, 
<b>ZOO_LOG_LEVEL_WARN</b> = 2, 
<b>ZOO_LOG_LEVEL_INFO</b> = 3, 
<b>ZOO_LOG_LEVEL_DEBUG</b> = 4
 }</td></tr>
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI <a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> (const char *host, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> fn, int recv_timeout, const <a class="el" href="structclientid__t.html">clientid_t</a> *clientid, void *context, int flags)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">create a handle to used communicate with zookeeper.  <a href="#a484b8767fa8f150cd15923fabafa90de"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ad739d8cb9288daded58d4cbdede83937">zookeeper_close</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">close the zookeeper handle and free up any resources.  <a href="#ad739d8cb9288daded58d4cbdede83937"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a505d6914026c3eb9c1f8671faf6e40e0"></a><!-- doxytag: member="zookeeper.h::zoo_client_id" ref="a505d6914026c3eb9c1f8671faf6e40e0" args="(zhandle_t *zh)" -->
ZOOAPI const <a class="el" href="structclientid__t.html">clientid_t</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a505d6914026c3eb9c1f8671faf6e40e0">zoo_client_id</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return the client session id, only valid if the connections is currently connected (ie. last watcher state is ZOO_CONNECTED_STATE) <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a09ade518dc8a55d090e4eb5e1606e87c"></a><!-- doxytag: member="zookeeper.h::zoo_recv_timeout" ref="a09ade518dc8a55d090e4eb5e1606e87c" args="(zhandle_t *zh)" -->
ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><b>zoo_recv_timeout</b> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a20ce49322c414b5ab7a21b9c0ff76483"></a><!-- doxytag: member="zookeeper.h::zoo_get_context" ref="a20ce49322c414b5ab7a21b9c0ff76483" args="(zhandle_t *zh)" -->
ZOOAPI const void *&#160;</td><td class="memItemRight" valign="bottom"><b>zoo_get_context</b> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2699e36e7a36e991ca9d12725adadf7a"></a><!-- doxytag: member="zookeeper.h::zoo_set_context" ref="a2699e36e7a36e991ca9d12725adadf7a" args="(zhandle_t *zh, void *context)" -->
ZOOAPI void&#160;</td><td class="memItemRight" valign="bottom"><b>zoo_set_context</b> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, void *context)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a8d2e6bf2a5c9df9e7a8408df68c87240">zoo_set_watcher</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> newFn)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">set a watcher function  <a href="#a8d2e6bf2a5c9df9e7a8408df68c87240"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a56fef9c216e6dce777353e584fb6e1c1">zookeeper_interest</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, int *fd, int *interest, struct timeval *tv)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the events that zookeeper is interested in.  <a href="#a56fef9c216e6dce777353e584fb6e1c1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a077c33ef2fa1ab1fcacc2fa62d9d2dee">zookeeper_process</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, int events)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Notifies zookeeper that an event of interest has happened.  <a href="#a077c33ef2fa1ab1fcacc2fa62d9d2dee"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a96522525031e264b6191d6d4dd0b5566">zoo_state</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">get the state of the zookeeper connection.  <a href="#a96522525031e264b6191d6d4dd0b5566"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ac4644673723420167d0a89094f4fad06">zoo_acreate</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, const char *value, int valuelen, const struct ACL_vector *acl, int flags, <a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">create a node.  <a href="#ac4644673723420167d0a89094f4fad06"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a3a63a9f5fc75849fba0e0ab178dcd232">zoo_adelete</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int version, <a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">delete a node in zookeeper.  <a href="#a3a63a9f5fc75849fba0e0ab178dcd232"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#aa171f014faccf74632e438aec9620ee9">zoo_aexists</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, <a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks the existence of a node in zookeeper.  <a href="#aa171f014faccf74632e438aec9620ee9"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a5d9b03f81ed3efa30d9ae8a163587507">zoo_awexists</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, <a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks the existence of a node in zookeeper.  <a href="#a5d9b03f81ed3efa30d9ae8a163587507"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a8959afbd341ebed5785651615dcd3448">zoo_aget</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, <a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the data associated with a node.  <a href="#a8959afbd341ebed5785651615dcd3448"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a27a5356ab2b02b5f1e0637653dc95d07">zoo_awget</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, <a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the data associated with a node.  <a href="#a27a5356ab2b02b5f1e0637653dc95d07"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a0469d9d9eda1ac92ec5228187aadd7c8">zoo_aset</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, const char *buffer, int buflen, int version, <a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the data associated with a node.  <a href="#a0469d9d9eda1ac92ec5228187aadd7c8"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a200a306ec626cc4a841f5eee9f5c6e95">zoo_aget_children</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, <a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">lists the children of a node.  <a href="#a200a306ec626cc4a841f5eee9f5c6e95"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a7693f23caf85771212c348d3bdf72670">zoo_awget_children</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, <a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">lists the children of a node.  <a href="#a7693f23caf85771212c348d3bdf72670"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a6727169e54ab8c046231b01bccc1048a">zoo_async</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Flush leader channel.  <a href="#a6727169e54ab8c046231b01bccc1048a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a2949140b419b66eaf3215a149acae040">zoo_aget_acl</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#ab0273881ddd7eea98d98637b2137a2c8">acl_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the acl associated with a node.  <a href="#a2949140b419b66eaf3215a149acae040"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a42e2dfbf93e0aab4146dc8811d29756f">zoo_aset_acl</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int version, struct ACL_vector *acl, <a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a>, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the acl associated with a node.  <a href="#a42e2dfbf93e0aab4146dc8811d29756f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a3d761ed65ee897f45a0e374ebc0f4d30">zerror</a> (int c)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">return an error string.  <a href="#a3d761ed65ee897f45a0e374ebc0f4d30"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#add00e81d3cb8041ecec95249512500c2">zoo_add_auth</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *scheme, const char *cert, int certLen, <a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a> completion, const void *data)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">specify application credentials.  <a href="#add00e81d3cb8041ecec95249512500c2"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a09c8242baaf276f46cd822a0fb053f9e">is_unrecoverable</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks if the current zookeeper connection state can't be recovered.  <a href="#a09c8242baaf276f46cd822a0fb053f9e"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ade881324f9377989bc721f4072df613e"></a><!-- doxytag: member="zookeeper.h::zoo_set_debug_level" ref="ade881324f9377989bc721f4072df613e" args="(ZooLogLevel logLevel)" -->
ZOOAPI void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ade881324f9377989bc721f4072df613e">zoo_set_debug_level</a> (ZooLogLevel logLevel)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the debugging level for the library <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a8c317bd06867b8ed1af5d330949677e1">zoo_set_log_stream</a> (FILE *logStream)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the stream to be used by the library for logging  <a href="#a8c317bd06867b8ed1af5d330949677e1"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a626b763c03debdb118228e34a1b28724">zoo_deterministic_conn_order</a> (int yesOrNo)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">enable/disable quorum endpoint order randomization  <a href="#a626b763c03debdb118228e34a1b28724"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a3d28332b6ab383445faf838e4178ee64">zoo_create</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, const char *value, int valuelen, const struct ACL_vector *acl, int flags, char *path_buffer, int path_buffer_len)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">create a node synchronously.  <a href="#a3d28332b6ab383445faf838e4178ee64"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a6193efb017205069e110a79f19b6fa4b">zoo_delete</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int version)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">delete a node in zookeeper synchronously.  <a href="#a6193efb017205069e110a79f19b6fa4b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a70bb2108d1d1646a8379135630fc9195">zoo_exists</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks the existence of a node in zookeeper synchronously.  <a href="#a70bb2108d1d1646a8379135630fc9195"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a098356e008bd07b3b00a1c4637f2369b">zoo_wexists</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">checks the existence of a node in zookeeper synchronously.  <a href="#a098356e008bd07b3b00a1c4637f2369b"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a9b2b234acbe429205757b86bb4f042f4">zoo_get</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, char *buffer, int *buffer_len, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the data associated with a node synchronously.  <a href="#a9b2b234acbe429205757b86bb4f042f4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#af359f8e1912e4b9022206740f98e79ba">zoo_wget</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, char *buffer, int *buffer_len, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the data associated with a node synchronously.  <a href="#af359f8e1912e4b9022206740f98e79ba"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#af726c22625275850315a3c47f4aea97a">zoo_set</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, const char *buffer, int buflen, int version)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the data associated with a node. See zoo_set2 function if you require access to the stat information associated with the znode.  <a href="#af726c22625275850315a3c47f4aea97a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#ab2e830152ae3bc578c7d6a0dc13d2d17">zoo_set2</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, const char *buffer, int buflen, int version, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the data associated with a node. This function is the same as zoo_set except that it also provides access to stat information associated with the znode.  <a href="#ab2e830152ae3bc578c7d6a0dc13d2d17"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a281c9de9e479dbcc364f76dd24c2ee15">zoo_get_children</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int watch, struct String_vector *strings)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">lists the children of a node synchronously.  <a href="#a281c9de9e479dbcc364f76dd24c2ee15"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a570b704215ea13cc8ceda64ccbaf8323">zoo_wget_children</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> watcher, void *watcherCtx, struct String_vector *strings)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">lists the children of a node synchronously.  <a href="#a570b704215ea13cc8ceda64ccbaf8323"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a2fd7d570522b02e2fe9db64b808e71e4">zoo_get_acl</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, struct ACL_vector *acl, struct Stat *stat)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">gets the acl associated with a node synchronously.  <a href="#a2fd7d570522b02e2fe9db64b808e71e4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a1f98236df8d40b6b37edf1bacb7d035b">zoo_set_acl</a> (<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, const char *path, int version, const struct ACL_vector *acl)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">sets the acl associated with a node synchronously.  <a href="#a1f98236df8d40b6b37edf1bacb7d035b"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td colspan="2"><div class="groupHeader">ACL Consts</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a42b8ce53f3a5fffe5226eba88478f421"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_READ" ref="a42b8ce53f3a5fffe5226eba88478f421" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_READ</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad0587cac136bc1b33d31d5f97c7e7dcb"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_WRITE" ref="ad0587cac136bc1b33d31d5f97c7e7dcb" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_WRITE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae9cb3607ac327e79da10c9cbbaac39a5"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_CREATE" ref="ae9cb3607ac327e79da10c9cbbaac39a5" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_CREATE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a90d38cea7c7f4ba55cc105b979d7bf25"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_DELETE" ref="a90d38cea7c7f4ba55cc105b979d7bf25" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_DELETE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2c82bfe7e4adceeff852c8db1fc5289d"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_ADMIN" ref="a2c82bfe7e4adceeff852c8db1fc5289d" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_ADMIN</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3e1650aa43342627fb5a68b0099f1a7"></a><!-- doxytag: member="zookeeper.h::ZOO_PERM_ALL" ref="af3e1650aa43342627fb5a68b0099f1a7" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_PERM_ALL</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI struct Id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a1b791c9c72613592267f0272832e61d5">ZOO_ANYONE_ID_UNSAFE</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI struct Id&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a0821b8d404588c3a0e6a053e0fed5b94">ZOO_AUTH_IDS</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI struct ACL_vector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#af705e7757024bed308db5f51fb66d206">ZOO_OPEN_ACL_UNSAFE</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI struct ACL_vector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a6028ec3420071b8ede5913c88b498eb9">ZOO_READ_ACL_UNSAFE</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI struct ACL_vector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a8952fa6cdcf5ae1ed59a516701f6f450">ZOO_CREATOR_ALL_ACL</a></td></tr>
<tr><td colspan="2"><div class="groupHeader">Interest Consts</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These constants are used to express interest in an event and to indicate to zookeeper which events have occurred. They can be ORed together to express multiple interests. These flags are used in the interest and event parameters of <a class="el" href="zookeeper_8h.html#a56fef9c216e6dce777353e584fb6e1c1">zookeeper_interest</a> and <a class="el" href="zookeeper_8h.html#a077c33ef2fa1ab1fcacc2fa62d9d2dee">zookeeper_process</a>. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6f9c5e0c6da444a49a5c52497396e7a9"></a><!-- doxytag: member="zookeeper.h::ZOOKEEPER_WRITE" ref="a6f9c5e0c6da444a49a5c52497396e7a9" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOOKEEPER_WRITE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8be3c571dc35212aeca9f7f4b889a8e2"></a><!-- doxytag: member="zookeeper.h::ZOOKEEPER_READ" ref="a8be3c571dc35212aeca9f7f4b889a8e2" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOOKEEPER_READ</b></td></tr>
<tr><td colspan="2"><div class="groupHeader">Create Flags</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These flags are used by zoo_create to affect node create. They may be ORed together to combine effects. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a902ef53a6e0d51c8ddf3561484d13f91"></a><!-- doxytag: member="zookeeper.h::ZOO_EPHEMERAL" ref="a902ef53a6e0d51c8ddf3561484d13f91" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_EPHEMERAL</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9d84b1ad72525d4734503bd3daddbff0"></a><!-- doxytag: member="zookeeper.h::ZOO_SEQUENCE" ref="a9d84b1ad72525d4734503bd3daddbff0" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_SEQUENCE</b></td></tr>
<tr><td colspan="2"><div class="groupHeader">State Consts</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These constants represent the states of a zookeeper connection. They are possible parameters of the watcher callback. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa66ec32564a57ec0eabe492db05d6379"></a><!-- doxytag: member="zookeeper.h::ZOO_EXPIRED_SESSION_STATE" ref="aa66ec32564a57ec0eabe492db05d6379" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_EXPIRED_SESSION_STATE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a35460ff4f414d011e2c390d0bd417272"></a><!-- doxytag: member="zookeeper.h::ZOO_AUTH_FAILED_STATE" ref="a35460ff4f414d011e2c390d0bd417272" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_AUTH_FAILED_STATE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a64953744f620944c63b54bdbd3e735f7"></a><!-- doxytag: member="zookeeper.h::ZOO_CONNECTING_STATE" ref="a64953744f620944c63b54bdbd3e735f7" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_CONNECTING_STATE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2084d252a687b0f7235f72699f829dca"></a><!-- doxytag: member="zookeeper.h::ZOO_ASSOCIATING_STATE" ref="a2084d252a687b0f7235f72699f829dca" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_ASSOCIATING_STATE</b></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1bdb51c72a47789af53a7414ff462939"></a><!-- doxytag: member="zookeeper.h::ZOO_CONNECTED_STATE" ref="a1bdb51c72a47789af53a7414ff462939" args="" -->
ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><b>ZOO_CONNECTED_STATE</b></td></tr>
<tr><td colspan="2"><div class="groupHeader">Watch Types</div></td></tr>
<tr><td colspan="2"><div class="groupText"><p>These constants indicate the event that caused the watch event. They are possible values of the first parameter of the watcher callback. </p>
</div></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a5d6848e9747568219ec887b5bd6a9311">ZOO_CREATED_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a node has been created.  <a href="#a5d6848e9747568219ec887b5bd6a9311"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#af183916e0570f387ac298a46c1d21e50">ZOO_DELETED_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a node has been deleted.  <a href="#af183916e0570f387ac298a46c1d21e50"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a306c30235e0a593c1fe69c6638d2f7a5">ZOO_CHANGED_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a node has changed.  <a href="#a306c30235e0a593c1fe69c6638d2f7a5"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a38921e47ffd8ba887d38a47dbc538340">ZOO_CHILD_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a change as occurred in the list of children.  <a href="#a38921e47ffd8ba887d38a47dbc538340"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a31b6a709716ac3317f76f59e49db0e3a">ZOO_SESSION_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a session has been lost.  <a href="#a31b6a709716ac3317f76f59e49db0e3a"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">ZOOAPI const int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="zookeeper_8h.html#a10c6fbbf2c9a81209f0b971b2b563006">ZOO_NOTWATCHING_EVENT</a></td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">a watch has been removed.  <a href="#a10c6fbbf2c9a81209f0b971b2b563006"></a><br/></td></tr>
</table>
<hr/><a name="_details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>ZooKeeper functions and definitions. </p>
<p>Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at</p>
<p><a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a></p>
<p>Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.</p>
<p>ZooKeeper is a network service that may be backed by a cluster of synchronized servers. The data in the service is represented as a tree of data nodes. Each node has data, children, an ACL, and status information. The data for a node is read and write in its entirety.</p>
<p>ZooKeeper clients can leave watches when they queries the data or children of a node. If a watch is left, that client will be notified of the change. The notification is a one time trigger. Subsequent chances to the node will not trigger a notification unless the client issues a querity with the watch flag set. If the client is ever disconnected from the service, even if the disconnection is temporary, the watches of the client will be removed from the service, so a client must treat a disconnect notification as an implicit trigger of all outstanding watches.</p>
<p>When a node is created, it may be flagged as an ephemeral node. Ephemeral nodes are automatically removed when a client session is closed or when a session times out due to inactivity (the ZooKeeper runtime fills in periods of inactivity with pings). Ephemeral nodes cannot have children.</p>
<p>ZooKeeper clients are identified by a server assigned session id. For security reasons The server also generates a corresponding password for a session. A client may save its id and corresponding password to persistent storage in order to use the session across program invocation boundaries. </p>
</div><hr/><h2>Typedef Documentation</h2>
<a class="anchor" id="ab0273881ddd7eea98d98637b2137a2c8"></a><!-- doxytag: member="zookeeper.h::acl_completion_t" ref="ab0273881ddd7eea98d98637b2137a2c8" args=")(int rc, struct ACL_vector *acl, struct Stat *stat, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#ab0273881ddd7eea98d98637b2137a2c8">acl_completion_t</a>)(int rc, struct ACL_vector *acl, struct Stat *stat, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function that returns an ACL. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">acl</td><td>a pointer to the structure containng the ACL of a node. If a non zero error code is returned, the content of strings is undefined. The programmer is NOT responsible for freeing acl. </td></tr>
    <tr><td class="paramname">stat</td><td>a pointer to the stat information for the node involved in this function. If a non zero error code is returned, the content of stat is undefined. The programmer is NOT responsible for freeing stat. </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2eaedcd3874b449281020b66aa27f239"></a><!-- doxytag: member="zookeeper.h::data_completion_t" ref="a2eaedcd3874b449281020b66aa27f239" args=")(int rc, const char *value, int value_len, const struct Stat *stat, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a>)(int rc, const char *value, int value_len, const struct Stat *stat, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function that returns data. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">value</td><td>the value of the information returned by the asynchronous call. If a non zero error code is returned, the content of value is undefined. The programmer is NOT responsible for freeing value. </td></tr>
    <tr><td class="paramname">value_len</td><td>the number of bytes in value. </td></tr>
    <tr><td class="paramname">stat</td><td>a pointer to the stat information for the node involved in this function. If a non zero error code is returned, the content of stat is undefined. The programmer is NOT responsible for freeing stat. </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a261bdb8998c8de8b96b333fa06a2b831"></a><!-- doxytag: member="zookeeper.h::stat_completion_t" ref="a261bdb8998c8de8b96b333fa06a2b831" args=")(int rc, const struct Stat *stat, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a>)(int rc, const struct Stat *stat, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function that returns a Stat structure. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">stat</td><td>a pointer to the stat information for the node involved in this function. If a non zero error code is returned, the content of stat is undefined. The programmer is NOT responsible for freeing stat. </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="acc042bba1f47cee718330179bd613ac1"></a><!-- doxytag: member="zookeeper.h::string_completion_t" ref="acc042bba1f47cee718330179bd613ac1" args=")(int rc, const char *value, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a>)(int rc, const char *value, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function that returns a list of strings. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">value</td><td>the value of the string returned. </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a151bfd8a6bd8b25c43e8c2c3275b9546"></a><!-- doxytag: member="zookeeper.h::strings_completion_t" ref="a151bfd8a6bd8b25c43e8c2c3275b9546" args=")(int rc, const struct String_vector *strings, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a>)(int rc, const struct String_vector *strings, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function that returns a list of strings. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">strings</td><td>a pointer to the structure containng the list of strings of the names of the children of a node. If a non zero error code is returned, the content of strings is undefined. The programmer is NOT responsible for freeing strings. </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ae0c602c3bb94988ef46d0428211db49a"></a><!-- doxytag: member="zookeeper.h::void_completion_t" ref="ae0c602c3bb94988ef46d0428211db49a" args=")(int rc, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a>)(int rc, const void *data)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a completion function for a call that returns void. </p>
<p>This method will be invoked at the end of a asynchronous call and also as a result of connection loss or timeout. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rc</td><td>the error code of the call. Connection loss/timeout triggers the completion with one of the following error codes: ZCONNECTIONLOSS -- lost connection to the server ZOPERATIONTIMEOUT -- connection timed out Data related events trigger the completion with error codes listed the Exceptions section of the documentation of the function that initiated the call. (Zero indicates call was successful.) </td></tr>
    <tr><td class="paramname">data</td><td>the pointer that was passed by the caller when the function that this completion corresponds to was invoked. The programmer is responsible for any memory freeing associated with the data pointer. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3c087870022121ef51dd2e7c43c7cd39"></a><!-- doxytag: member="zookeeper.h::watcher_fn" ref="a3c087870022121ef51dd2e7c43c7cd39" args=")(zhandle_t *zh, int type, int state, const char *path, void *watcherCtx)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef void(* <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>)(<a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *zh, int type, int state, const char *path, void *watcherCtx)</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>signature of a watch function. </p>
<p>There are two ways to receive watch notifications: legacy and watcher object. </p>
<p>The legacy style, an application wishing to receive events from ZooKeeper must first implement a function with this signature and pass a pointer to the function to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>. Next, the application sets a watch by calling one of the getter API that accept the watch integer flag (for example, <a class="el" href="zookeeper_8h.html#aa171f014faccf74632e438aec9620ee9">zoo_aexists</a>, <a class="el" href="zookeeper_8h.html#a9b2b234acbe429205757b86bb4f042f4">zoo_get</a>, etc). </p>
<p>The watcher object style uses an instance of a "watcher object" which in the C world is represented by a pair: a pointer to a function implementing this signature and a pointer to watcher context -- handback user-specific data. When a watch is triggered this function will be called along with the watcher context. An application wishing to use this style must use the getter API functions with the "w" prefix in their names (for example, <a class="el" href="zookeeper_8h.html#a5d9b03f81ed3efa30d9ae8a163587507">zoo_awexists</a>, <a class="el" href="zookeeper_8h.html#af359f8e1912e4b9022206740f98e79ba">zoo_wget</a>, etc).</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>zookeeper handle </td></tr>
    <tr><td class="paramname">type</td><td>event type. This is one of the *_EVENT constants. </td></tr>
    <tr><td class="paramname">state</td><td>connection state. The state value will be one of the *_STATE constants. </td></tr>
    <tr><td class="paramname">path</td><td>znode path for which the watcher is triggered. NULL if the event type is ZOO_SESSION_EVENT </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>watcher context. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="abbb713010da1056bae16baf23495d3ca"></a><!-- doxytag: member="zookeeper.h::zhandle_t" ref="abbb713010da1056bae16baf23495d3ca" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct _zhandle <a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>ZooKeeper handle. </p>
<p>This is the handle that represents a connection to the ZooKeeper service. It is needed to invoke any ZooKeeper function. A handle is obtained using <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>. </p>

</div>
</div>
<hr/><h2>Enumeration Type Documentation</h2>
<a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4c"></a><!-- doxytag: member="zookeeper.h::ZOO_ERRORS" ref="abb1a0a179f313b2e44ee92369c438a4c" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4c">ZOO_ERRORS</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>zookeeper return constants </p>
<dl><dt><b>Enumerator: </b></dt><dd><table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca9677bf3e4face8afd292d31ecfd4dc5d"></a><!-- doxytag: member="ZOK" ref="abb1a0a179f313b2e44ee92369c438a4ca9677bf3e4face8afd292d31ecfd4dc5d" args="" -->ZOK</em>&nbsp;</td><td>
<p>Everything is OK </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca7c58662f7e5b1427aa3ad1bf979681e7"></a><!-- doxytag: member="ZSYSTEMERROR" ref="abb1a0a179f313b2e44ee92369c438a4ca7c58662f7e5b1427aa3ad1bf979681e7" args="" -->ZSYSTEMERROR</em>&nbsp;</td><td>
<p>System and server-side errors. This is never thrown by the server, it shouldn't be used other than to indicate a range. Specifically error codes greater than this value, but lesser than <a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4cac22fcec5daf479703b045288a13afa67">ZAPIERROR</a>, are system errors. </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca9eabb281ab14c74db3aff9ab456fa7fe"></a><!-- doxytag: member="ZRUNTIMEINCONSISTENCY" ref="abb1a0a179f313b2e44ee92369c438a4ca9eabb281ab14c74db3aff9ab456fa7fe" args="" -->ZRUNTIMEINCONSISTENCY</em>&nbsp;</td><td>
<p>A runtime inconsistency was found </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca138188b6639b2a7ebe2d0e4e6555dad8"></a><!-- doxytag: member="ZDATAINCONSISTENCY" ref="abb1a0a179f313b2e44ee92369c438a4ca138188b6639b2a7ebe2d0e4e6555dad8" args="" -->ZDATAINCONSISTENCY</em>&nbsp;</td><td>
<p>A data inconsistency was found </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4caeb234e9a730fbad7f49e43349f22f4a1"></a><!-- doxytag: member="ZCONNECTIONLOSS" ref="abb1a0a179f313b2e44ee92369c438a4caeb234e9a730fbad7f49e43349f22f4a1" args="" -->ZCONNECTIONLOSS</em>&nbsp;</td><td>
<p>Connection to the server has been lost </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca68f884a7beb9b023ccc6f675a0c04c84"></a><!-- doxytag: member="ZMARSHALLINGERROR" ref="abb1a0a179f313b2e44ee92369c438a4ca68f884a7beb9b023ccc6f675a0c04c84" args="" -->ZMARSHALLINGERROR</em>&nbsp;</td><td>
<p>Error while marshalling or unmarshalling data </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca59dbde4876cf39d0cb855749712375af"></a><!-- doxytag: member="ZUNIMPLEMENTED" ref="abb1a0a179f313b2e44ee92369c438a4ca59dbde4876cf39d0cb855749712375af" args="" -->ZUNIMPLEMENTED</em>&nbsp;</td><td>
<p>Operation is unimplemented </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca09e4dce97bd35812cd4340f92bfc56f2"></a><!-- doxytag: member="ZOPERATIONTIMEOUT" ref="abb1a0a179f313b2e44ee92369c438a4ca09e4dce97bd35812cd4340f92bfc56f2" args="" -->ZOPERATIONTIMEOUT</em>&nbsp;</td><td>
<p>Operation timeout </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4cacf4f43d3a9aa644ce0d6fde3b466aed8"></a><!-- doxytag: member="ZBADARGUMENTS" ref="abb1a0a179f313b2e44ee92369c438a4cacf4f43d3a9aa644ce0d6fde3b466aed8" args="" -->ZBADARGUMENTS</em>&nbsp;</td><td>
<p>Invalid arguments </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca5ba3d8e81d105c45f9cca8475eff9dbf"></a><!-- doxytag: member="ZINVALIDSTATE" ref="abb1a0a179f313b2e44ee92369c438a4ca5ba3d8e81d105c45f9cca8475eff9dbf" args="" -->ZINVALIDSTATE</em>&nbsp;</td><td>
<p>Invliad zhandle state </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4cac22fcec5daf479703b045288a13afa67"></a><!-- doxytag: member="ZAPIERROR" ref="abb1a0a179f313b2e44ee92369c438a4cac22fcec5daf479703b045288a13afa67" args="" -->ZAPIERROR</em>&nbsp;</td><td>
<p>API errors. This is never thrown by the server, it shouldn't be used other than to indicate a range. Specifically error codes greater than this value are API errors (while values less than this indicate a <a class="el" href="zookeeper_8h.html#abb1a0a179f313b2e44ee92369c438a4ca7c58662f7e5b1427aa3ad1bf979681e7">ZSYSTEMERROR</a>). </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca18572f341d99957f2f95ccab2275c68f"></a><!-- doxytag: member="ZNONODE" ref="abb1a0a179f313b2e44ee92369c438a4ca18572f341d99957f2f95ccab2275c68f" args="" -->ZNONODE</em>&nbsp;</td><td>
<p>Node does not exist </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca3930a0c2aae1bdca49bdd440c9405c00"></a><!-- doxytag: member="ZNOAUTH" ref="abb1a0a179f313b2e44ee92369c438a4ca3930a0c2aae1bdca49bdd440c9405c00" args="" -->ZNOAUTH</em>&nbsp;</td><td>
<p>Not authenticated </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca37873fe49b1e08eec5753b5e45269a2c"></a><!-- doxytag: member="ZBADVERSION" ref="abb1a0a179f313b2e44ee92369c438a4ca37873fe49b1e08eec5753b5e45269a2c" args="" -->ZBADVERSION</em>&nbsp;</td><td>
<p>Version conflict </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4caa11331b98571065cff0c901003b05722"></a><!-- doxytag: member="ZNOCHILDRENFOREPHEMERALS" ref="abb1a0a179f313b2e44ee92369c438a4caa11331b98571065cff0c901003b05722" args="" -->ZNOCHILDRENFOREPHEMERALS</em>&nbsp;</td><td>
<p>Ephemeral nodes may not have children </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca1160268179c369d39072d98b4449409f"></a><!-- doxytag: member="ZNODEEXISTS" ref="abb1a0a179f313b2e44ee92369c438a4ca1160268179c369d39072d98b4449409f" args="" -->ZNODEEXISTS</em>&nbsp;</td><td>
<p>The node already exists </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca66f5ea514ccddfa39127db1f7021720a"></a><!-- doxytag: member="ZNOTEMPTY" ref="abb1a0a179f313b2e44ee92369c438a4ca66f5ea514ccddfa39127db1f7021720a" args="" -->ZNOTEMPTY</em>&nbsp;</td><td>
<p>The node has children </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca98d749ce49260dcf034143e03836ff91"></a><!-- doxytag: member="ZSESSIONEXPIRED" ref="abb1a0a179f313b2e44ee92369c438a4ca98d749ce49260dcf034143e03836ff91" args="" -->ZSESSIONEXPIRED</em>&nbsp;</td><td>
<p>The session has been expired by the server </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4cac991a5a3b3617e683710fa6f10ef6b08"></a><!-- doxytag: member="ZINVALIDCALLBACK" ref="abb1a0a179f313b2e44ee92369c438a4cac991a5a3b3617e683710fa6f10ef6b08" args="" -->ZINVALIDCALLBACK</em>&nbsp;</td><td>
<p>Invalid callback specified </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca0d5cdb15d20f814666d4876ba34e20d9"></a><!-- doxytag: member="ZINVALIDACL" ref="abb1a0a179f313b2e44ee92369c438a4ca0d5cdb15d20f814666d4876ba34e20d9" args="" -->ZINVALIDACL</em>&nbsp;</td><td>
<p>Invalid ACL specified </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca77f3c8167bb517e34acdfc31d82823f5"></a><!-- doxytag: member="ZAUTHFAILED" ref="abb1a0a179f313b2e44ee92369c438a4ca77f3c8167bb517e34acdfc31d82823f5" args="" -->ZAUTHFAILED</em>&nbsp;</td><td>
<p>Client authentication failed </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4cace82a8a5ecabd1ef86a6b7d9baf8904d"></a><!-- doxytag: member="ZCLOSING" ref="abb1a0a179f313b2e44ee92369c438a4cace82a8a5ecabd1ef86a6b7d9baf8904d" args="" -->ZCLOSING</em>&nbsp;</td><td>
<p>ZooKeeper is closing </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca0bc307f70db60743e87a6d8947a26fd4"></a><!-- doxytag: member="ZNOTHING" ref="abb1a0a179f313b2e44ee92369c438a4ca0bc307f70db60743e87a6d8947a26fd4" args="" -->ZNOTHING</em>&nbsp;</td><td>
<p>(not error) no server responses to process </p>
</td></tr>
<tr><td valign="top"><em><a class="anchor" id="abb1a0a179f313b2e44ee92369c438a4ca939cb9081488159221135f097bb453f5"></a><!-- doxytag: member="ZSESSIONMOVED" ref="abb1a0a179f313b2e44ee92369c438a4ca939cb9081488159221135f097bb453f5" args="" -->ZSESSIONMOVED</em>&nbsp;</td><td>
<p>session moved to another server, so operation is ignored </p>
</td></tr>
</table>
</dd>
</dl>

</div>
</div>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a09c8242baaf276f46cd822a0fb053f9e"></a><!-- doxytag: member="zookeeper.h::is_unrecoverable" ref="a09c8242baaf276f46cd822a0fb053f9e" args="(zhandle_t *zh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int is_unrecoverable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>checks if the current zookeeper connection state can't be recovered. </p>
<p>The application must close the zhandle and try to reconnect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle (see <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>) </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZINVALIDSTATE if connection is unrecoverable </dd></dl>

</div>
</div>
<a class="anchor" id="a3d761ed65ee897f45a0e374ebc0f4d30"></a><!-- doxytag: member="zookeeper.h::zerror" ref="a3d761ed65ee897f45a0e374ebc0f4d30" args="(int c)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const char* zerror </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>return an error string. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">return</td><td>code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>string corresponding to the return code </dd></dl>

</div>
</div>
<a class="anchor" id="ac4644673723420167d0a89094f4fad06"></a><!-- doxytag: member="zookeeper.h::zoo_acreate" ref="ac4644673723420167d0a89094f4fad06" args="(zhandle_t *zh, const char *path, const char *value, int valuelen, const struct ACL_vector *acl, int flags, string_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_acreate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valuelen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct ACL_vector *&#160;</td>
          <td class="paramname"><em>acl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>create a node. </p>
<p>This method will create a node in ZooKeeper. A node can only be created if it does not already exists. The Create Flags affect the creation of nodes. If ZOO_EPHEMERAL flag is set, the node will automatically get removed if the client session goes away. If the ZOO_SEQUENCE flag is set, a unique monotonically increasing sequence number is appended to the path name.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>The name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">value</td><td>The data to be stored in the node. </td></tr>
    <tr><td class="paramname">valuelen</td><td>The number of bytes in data. </td></tr>
    <tr><td class="paramname">acl</td><td>The initial ACL of the node. If null, the ACL of the parent will be used. </td></tr>
    <tr><td class="paramname">flags</td><td>this parameter can be set to 0 for normal create or an OR of the Create Flags </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the parent node does not exist. ZNODEEXISTS the node already exists ZNOAUTH the client does not have permission. ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes. </td></tr>
    <tr><td class="paramname">data</td><td>The data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="add00e81d3cb8041ecec95249512500c2"></a><!-- doxytag: member="zookeeper.h::zoo_add_auth" ref="add00e81d3cb8041ecec95249512500c2" args="(zhandle_t *zh, const char *scheme, const char *cert, int certLen, void_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_add_auth </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>scheme</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>cert</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>certLen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>specify application credentials. </p>
<p>The application calls this function to specify its credentials for purposes of authentication. The server will use the security provider specified by the scheme parameter to authenticate the client connection. If the authentication request has failed:</p>
<ul>
<li>the server connection is dropped</li>
<li>the watcher is called with the ZOO_AUTH_FAILED_STATE value as the state parameter. <dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">scheme</td><td>the id of authentication scheme. Natively supported: "digest" password-based authentication </td></tr>
    <tr><td class="paramname">cert</td><td>application credentials. The actual value depends on the scheme. </td></tr>
    <tr><td class="paramname">certLen</td><td>the length of the data parameter </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. One of the following result codes may be passed into the completion callback: ZOK operation completed successfully ZAUTHFAILED authentication failed </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory ZSYSTEMERROR - a system error occured </dd></dl>
</li>
</ul>

</div>
</div>
<a class="anchor" id="a3a63a9f5fc75849fba0e0ab178dcd232"></a><!-- doxytag: member="zookeeper.h::zoo_adelete" ref="a3a63a9f5fc75849fba0e0ab178dcd232" args="(zhandle_t *zh, const char *path, int version, void_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_adelete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>delete a node in zookeeper. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADVERSION expected version does not match actual version. ZNOTEMPTY children are present; node cannot be deleted. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="aa171f014faccf74632e438aec9620ee9"></a><!-- doxytag: member="zookeeper.h::zoo_aexists" ref="aa171f014faccf74632e438aec9620ee9" args="(zhandle_t *zh, const char *path, int watch, stat_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aexists </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>checks the existence of a node in zookeeper. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. The watch will be set even if the node does not exist. This allows clients to watch for nodes to appear. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a8959afbd341ebed5785651615dcd3448"></a><!-- doxytag: member="zookeeper.h::zoo_aget" ref="a8959afbd341ebed5785651615dcd3448" args="(zhandle_t *zh, const char *path, int watch, data_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the data associated with a node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a2949140b419b66eaf3215a149acae040"></a><!-- doxytag: member="zookeeper.h::zoo_aget_acl" ref="a2949140b419b66eaf3215a149acae040" args="(zhandle_t *zh, const char *path, acl_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aget_acl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#ab0273881ddd7eea98d98637b2137a2c8">acl_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the acl associated with a node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a200a306ec626cc4a841f5eee9f5c6e95"></a><!-- doxytag: member="zookeeper.h::zoo_aget_children" ref="a200a306ec626cc4a841f5eee9f5c6e95" args="(zhandle_t *zh, const char *path, int watch, strings_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aget_children </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>lists the children of a node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a0469d9d9eda1ac92ec5228187aadd7c8"></a><!-- doxytag: member="zookeeper.h::zoo_aset" ref="a0469d9d9eda1ac92ec5228187aadd7c8" args="(zhandle_t *zh, const char *path, const char *buffer, int buflen, int version, stat_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aset </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>buflen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the data associated with a node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding data to be written to the node. </td></tr>
    <tr><td class="paramname">buflen</td><td>the number of bytes from buffer to write. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place. * completion: If null, the function will execute synchronously. Otherwise, the function will return immediately and invoke the completion routine when the request completes. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADVERSION expected version does not match actual version. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a42e2dfbf93e0aab4146dc8811d29756f"></a><!-- doxytag: member="zookeeper.h::zoo_aset_acl" ref="a42e2dfbf93e0aab4146dc8811d29756f" args="(zhandle_t *zh, const char *path, int version, struct ACL_vector *acl, void_completion_t, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_aset_acl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct ACL_vector *&#160;</td>
          <td class="paramname"><em>acl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#ae0c602c3bb94988ef46d0428211db49a">void_completion_t</a>&#160;</td>
          <td class="paramname">, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the acl associated with a node. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding the acls to be written to the node. </td></tr>
    <tr><td class="paramname">buflen</td><td>the number of bytes from buffer to write. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZINVALIDACL invalid ACL specified ZBADVERSION expected version does not match actual version. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a6727169e54ab8c046231b01bccc1048a"></a><!-- doxytag: member="zookeeper.h::zoo_async" ref="a6727169e54ab8c046231b01bccc1048a" args="(zhandle_t *zh, const char *path, string_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_async </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#acc042bba1f47cee718330179bd613ac1">string_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flush leader channel. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a5d9b03f81ed3efa30d9ae8a163587507"></a><!-- doxytag: member="zookeeper.h::zoo_awexists" ref="a5d9b03f81ed3efa30d9ae8a163587507" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, stat_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_awexists </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a261bdb8998c8de8b96b333fa06a2b831">stat_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>checks the existence of a node in zookeeper. </p>
<p>This function is similar to zoo_axists except it allows one specify a watcher object - a function pointer and associated context. The function will be called once the watch has fired. The associated context data will be passed to the function as the watcher context parameter.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null a watch will set on the specified znode on the server. The watch will be set even if the node does not exist. This allows clients to watch for nodes to appear. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a27a5356ab2b02b5f1e0637653dc95d07"></a><!-- doxytag: member="zookeeper.h::zoo_awget" ref="a27a5356ab2b02b5f1e0637653dc95d07" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, data_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_awget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a2eaedcd3874b449281020b66aa27f239">data_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the data associated with a node. </p>
<p>This function is similar to <a class="el" href="zookeeper_8h.html#a8959afbd341ebed5785651615dcd3448">zoo_aget</a> except it allows one specify a watcher object rather than a boolean watch flag.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a7693f23caf85771212c348d3bdf72670"></a><!-- doxytag: member="zookeeper.h::zoo_awget_children" ref="a7693f23caf85771212c348d3bdf72670" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, strings_completion_t completion, const void *data)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_awget_children </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a151bfd8a6bd8b25c43e8c2c3275b9546">strings_completion_t</a>&#160;</td>
          <td class="paramname"><em>completion</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>lists the children of a node. </p>
<p>This function is similar to <a class="el" href="zookeeper_8h.html#a200a306ec626cc4a841f5eee9f5c6e95">zoo_aget_children</a> except it allows one specify a watcher object rather than a boolean watch flag.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">completion</td><td>the routine to invoke when the request completes. The completion will be triggered with one of the following codes passed in as the rc argument: ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. </td></tr>
    <tr><td class="paramname">data</td><td>the data that will be passed to the completion routine when the function completes. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>ZOK on success or one of the following errcodes on failure: ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a3d28332b6ab383445faf838e4178ee64"></a><!-- doxytag: member="zookeeper.h::zoo_create" ref="a3d28332b6ab383445faf838e4178ee64" args="(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)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_create </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>valuelen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct ACL_vector *&#160;</td>
          <td class="paramname"><em>acl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>path_buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>path_buffer_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>create a node synchronously. </p>
<p>This method will create a node in ZooKeeper. A node can only be created if it does not already exists. The Create Flags affect the creation of nodes. If ZOO_EPHEMERAL flag is set, the node will automatically get removed if the client session goes away. If the ZOO_SEQUENCE flag is set, a unique monotonically increasing sequence number is appended to the path name.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>The name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">value</td><td>The data to be stored in the node. </td></tr>
    <tr><td class="paramname">valuelen</td><td>The number of bytes in data. To set the data to be NULL use value as NULL and valuelen as -1. </td></tr>
    <tr><td class="paramname">acl</td><td>The initial ACL of the node. If null, the ACL of the parent will be used. </td></tr>
    <tr><td class="paramname">flags</td><td>this parameter can be set to 0 for normal create or an OR of the Create Flags </td></tr>
    <tr><td class="paramname">path_buffer</td><td>Buffer which will be filled with the path of the new node (this might be different than the supplied path because of the ZOO_SEQUENCE flag). The path string will always be null-terminated. </td></tr>
    <tr><td class="paramname">path_buffer_len</td><td>Size of path buffer; if the path of the new node (including space for the null terminator) exceeds the buffer size, the path string will be truncated to fit. The actual path of the new node in the server will not be affected by the truncation. The path string will always be null-terminated. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>one of the following codes are returned: ZOK operation completed succesfully ZNONODE the parent node does not exist. ZNODEEXISTS the node already exists ZNOAUTH the client does not have permission. ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a6193efb017205069e110a79f19b6fa4b"></a><!-- doxytag: member="zookeeper.h::zoo_delete" ref="a6193efb017205069e110a79f19b6fa4b" args="(zhandle_t *zh, const char *path, int version)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_delete </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>delete a node in zookeeper synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>one of the following values is returned. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADVERSION expected version does not match actual version. ZNOTEMPTY children are present; node cannot be deleted. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a626b763c03debdb118228e34a1b28724"></a><!-- doxytag: member="zookeeper.h::zoo_deterministic_conn_order" ref="a626b763c03debdb118228e34a1b28724" args="(int yesOrNo)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI void zoo_deterministic_conn_order </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>yesOrNo</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>enable/disable quorum endpoint order randomization </p>
<p>If passed a non-zero value, will make the client connect to quorum peers in the order as specified in the <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de" title="create a handle to used communicate with zookeeper.">zookeeper_init()</a> call. A zero value causes <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de" title="create a handle to used communicate with zookeeper.">zookeeper_init()</a> to permute the peer endpoints which is good for more even client connection distribution among the quorum peers. </p>

</div>
</div>
<a class="anchor" id="a70bb2108d1d1646a8379135630fc9195"></a><!-- doxytag: member="zookeeper.h::zoo_exists" ref="a70bb2108d1d1646a8379135630fc9195" args="(zhandle_t *zh, const char *path, int watch, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_exists </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>checks the existence of a node in zookeeper synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. The watch will be set even if the node does not exist. This allows clients to watch for nodes to appear. </td></tr>
    <tr><td class="paramname">the</td><td>return stat value of the node. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>return code of the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a9b2b234acbe429205757b86bb4f042f4"></a><!-- doxytag: member="zookeeper.h::zoo_get" ref="a9b2b234acbe429205757b86bb4f042f4" args="(zhandle_t *zh, const char *path, int watch, char *buffer, int *buffer_len, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_get </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>buffer_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the data associated with a node synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding the node data returned by the server </td></tr>
    <tr><td class="paramname">buffer_len</td><td>is the size of the buffer pointed to by the buffer parameter. It'll be set to the actual data length upon return. If the data is NULL, length is -1. </td></tr>
    <tr><td class="paramname">stat</td><td>if not NULL, will hold the value of stat for the path on return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>return value of the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a2fd7d570522b02e2fe9db64b808e71e4"></a><!-- doxytag: member="zookeeper.h::zoo_get_acl" ref="a2fd7d570522b02e2fe9db64b808e71e4" args="(zhandle_t *zh, const char *path, struct ACL_vector *acl, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_get_acl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct ACL_vector *&#160;</td>
          <td class="paramname"><em>acl</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the acl associated with a node synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">acl</td><td>the return value of acls on the path. </td></tr>
    <tr><td class="paramname">stat</td><td>returns the stat of the path specified. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code for the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a281c9de9e479dbcc364f76dd24c2ee15"></a><!-- doxytag: member="zookeeper.h::zoo_get_children" ref="a281c9de9e479dbcc364f76dd24c2ee15" args="(zhandle_t *zh, const char *path, int watch, struct String_vector *strings)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_get_children </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>watch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct String_vector *&#160;</td>
          <td class="paramname"><em>strings</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>lists the children of a node synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watch</td><td>if nonzero, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">strings</td><td>return value of children paths. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code of the function. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="af726c22625275850315a3c47f4aea97a"></a><!-- doxytag: member="zookeeper.h::zoo_set" ref="af726c22625275850315a3c47f4aea97a" args="(zhandle_t *zh, const char *path, const char *buffer, int buflen, int version)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_set </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>buflen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the data associated with a node. See zoo_set2 function if you require access to the stat information associated with the znode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding data to be written to the node. </td></tr>
    <tr><td class="paramname">buflen</td><td>the number of bytes from buffer to write. To set NULL as data use buffer as NULL and buflen as -1. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code for the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADVERSION expected version does not match actual version. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="ab2e830152ae3bc578c7d6a0dc13d2d17"></a><!-- doxytag: member="zookeeper.h::zoo_set2" ref="ab2e830152ae3bc578c7d6a0dc13d2d17" args="(zhandle_t *zh, const char *path, const char *buffer, int buflen, int version, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_set2 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>buflen</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the data associated with a node. This function is the same as zoo_set except that it also provides access to stat information associated with the znode. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding data to be written to the node. </td></tr>
    <tr><td class="paramname">buflen</td><td>the number of bytes from buffer to write. To set NULL as data use buffer as NULL and buflen as -1. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the node. The function will fail if the actual version of the node does not match the expected version. If -1 is used the version check will not take place. </td></tr>
    <tr><td class="paramname">stat</td><td>if not NULL, will hold the value of stat for the path on return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code for the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADVERSION expected version does not match actual version. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a1f98236df8d40b6b37edf1bacb7d035b"></a><!-- doxytag: member="zookeeper.h::zoo_set_acl" ref="a1f98236df8d40b6b37edf1bacb7d035b" args="(zhandle_t *zh, const char *path, int version, const struct ACL_vector *acl)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_set_acl </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>version</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct ACL_vector *&#160;</td>
          <td class="paramname"><em>acl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the acl associated with a node synchronously. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">version</td><td>the expected version of the path. </td></tr>
    <tr><td class="paramname">acl</td><td>the acl to be set on the path. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code for the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZINVALIDACL invalid ACL specified ZBADVERSION expected version does not match actual version. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a8c317bd06867b8ed1af5d330949677e1"></a><!-- doxytag: member="zookeeper.h::zoo_set_log_stream" ref="a8c317bd06867b8ed1af5d330949677e1" args="(FILE *logStream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI void zoo_set_log_stream </td>
          <td>(</td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>logStream</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>sets the stream to be used by the library for logging </p>
<p>The zookeeper library uses stderr as its default log stream. Application must make sure the stream is writable. Passing in NULL resets the stream to its default value (stderr). </p>

</div>
</div>
<a class="anchor" id="a8d2e6bf2a5c9df9e7a8408df68c87240"></a><!-- doxytag: member="zookeeper.h::zoo_set_watcher" ref="a8d2e6bf2a5c9df9e7a8408df68c87240" args="(zhandle_t *zh, watcher_fn newFn)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI <a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a> zoo_set_watcher </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>newFn</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>set a watcher function </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>previous watcher function </dd></dl>

</div>
</div>
<a class="anchor" id="a96522525031e264b6191d6d4dd0b5566"></a><!-- doxytag: member="zookeeper.h::zoo_state" ref="a96522525031e264b6191d6d4dd0b5566" args="(zhandle_t *zh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_state </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>get the state of the zookeeper connection. </p>
<p>The return value will be one of the State Consts. </p>

</div>
</div>
<a class="anchor" id="a098356e008bd07b3b00a1c4637f2369b"></a><!-- doxytag: member="zookeeper.h::zoo_wexists" ref="a098356e008bd07b3b00a1c4637f2369b" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_wexists </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>checks the existence of a node in zookeeper synchronously. </p>
<p>This function is similar to <a class="el" href="zookeeper_8h.html#a70bb2108d1d1646a8379135630fc9195">zoo_exists</a> except it allows one specify a watcher object rather than a boolean watch flag.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null a watch will set on the specified znode on the server. The watch will be set even if the node does not exist. This allows clients to watch for nodes to appear. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">the</td><td>return stat value of the node. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>return code of the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="af359f8e1912e4b9022206740f98e79ba"></a><!-- doxytag: member="zookeeper.h::zoo_wget" ref="af359f8e1912e4b9022206740f98e79ba" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, char *buffer, int *buffer_len, struct Stat *stat)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_wget </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>buffer</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>buffer_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct Stat *&#160;</td>
          <td class="paramname"><em>stat</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>gets the data associated with a node synchronously. </p>
<p>This function is similar to <a class="el" href="zookeeper_8h.html#a9b2b234acbe429205757b86bb4f042f4">zoo_get</a> except it allows one specify a watcher object rather than a boolean watch flag.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">buffer</td><td>the buffer holding the node data returned by the server </td></tr>
    <tr><td class="paramname">buffer_len</td><td>is the size of the buffer pointed to by the buffer parameter. It'll be set to the actual data length upon return. If the data is NULL, length is -1. </td></tr>
    <tr><td class="paramname">stat</td><td>if not NULL, will hold the value of stat for the path on return. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>return value of the function call. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either in ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="a570b704215ea13cc8ceda64ccbaf8323"></a><!-- doxytag: member="zookeeper.h::zoo_wget_children" ref="a570b704215ea13cc8ceda64ccbaf8323" args="(zhandle_t *zh, const char *path, watcher_fn watcher, void *watcherCtx, struct String_vector *strings)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zoo_wget_children </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>path</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>watcher</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>watcherCtx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct String_vector *&#160;</td>
          <td class="paramname"><em>strings</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>lists the children of a node synchronously. </p>
<p>This function is similar to <a class="el" href="zookeeper_8h.html#a281c9de9e479dbcc364f76dd24c2ee15">zoo_get_children</a> except it allows one specify a watcher object rather than a boolean watch flag.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">path</td><td>the name of the node. Expressed as a file name with slashes separating ancestors of the node. </td></tr>
    <tr><td class="paramname">watcher</td><td>if non-null, a watch will be set at the server to notify the client if the node changes. </td></tr>
    <tr><td class="paramname">watcherCtx</td><td>user specific data, will be passed to the watcher callback. Unlike the global context set by <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a>, this watcher context is associated with the given instance of the watcher only. </td></tr>
    <tr><td class="paramname">strings</td><td>return value of children paths. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the return code of the function. ZOK operation completed succesfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory </dd></dl>

</div>
</div>
<a class="anchor" id="ad739d8cb9288daded58d4cbdede83937"></a><!-- doxytag: member="zookeeper.h::zookeeper_close" ref="ad739d8cb9288daded58d4cbdede83937" args="(zhandle_t *zh)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zookeeper_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>close the zookeeper handle and free up any resources. </p>
<p>After this call, the client session will no longer be valid. The function will flush any outstanding send requests before return. As a result it may block.</p>
<p>This method should only be called only once on a zookeeper handle. Calling twice will cause undefined (and probably undesirable behavior). Calling any other zookeeper method after calling close is undefined behaviour and should be avoided.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a result code. Regardless of the error code returned, the zhandle will be destroyed and all resources freed.</dd></dl>
<p>ZOK - success ZBADARGUMENTS - invalid input parameters ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory ZOPERATIONTIMEOUT - failed to flush the buffers within the specified timeout. ZCONNECTIONLOSS - a network error occured while attempting to send request to server ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details </p>

</div>
</div>
<a class="anchor" id="a484b8767fa8f150cd15923fabafa90de"></a><!-- doxytag: member="zookeeper.h::zookeeper_init" ref="a484b8767fa8f150cd15923fabafa90de" args="(const char *host, watcher_fn fn, int recv_timeout, const clientid_t *clientid, void *context, int flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI <a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a>* zookeeper_init </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#a3c087870022121ef51dd2e7c43c7cd39">watcher_fn</a>&#160;</td>
          <td class="paramname"><em>fn</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>recv_timeout</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structclientid__t.html">clientid_t</a> *&#160;</td>
          <td class="paramname"><em>clientid</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>create a handle to used communicate with zookeeper. </p>
<p>This method creates a new handle and a zookeeper session that corresponds to that handle. Session establishment is asynchronous, meaning that the session should not be considered established until (and unless) an event of state ZOO_CONNECTED_STATE is received. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>comma separated host:port pairs, each corresponding to a zk server. e.g. "127.0.0.1:3000,127.0.0.1:3001,127.0.0.1:3002" </td></tr>
    <tr><td class="paramname">fn</td><td>the global watcher callback function. When notifications are triggered this function will be invoked. </td></tr>
    <tr><td class="paramname">clientid</td><td>the id of a previously established session that this client will be reconnecting to. Pass 0 if not reconnecting to a previous session. Clients can access the session id of an established, valid, connection by calling <a class="el" href="zookeeper_8h.html#a505d6914026c3eb9c1f8671faf6e40e0">zoo_client_id</a>. If the session corresponding to the specified clientid has expired, or if the clientid is invalid for any reason, the returned zhandle_t will be invalid -- the zhandle_t state will indicate the reason for failure (typically ZOO_EXPIRED_SESSION_STATE). </td></tr>
    <tr><td class="paramname">context</td><td>the handback object that will be associated with this instance of zhandle_t. Application can access it (for example, in the watcher callback) using zoo_get_context. The object is not used by zookeeper internally and can be null. </td></tr>
    <tr><td class="paramname">flags</td><td>reserved for future use. Should be set to zero. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a pointer to the opaque zhandle structure. If it fails to create a new zhandle the function returns NULL and the errno variable indicates the reason. </dd></dl>

</div>
</div>
<a class="anchor" id="a56fef9c216e6dce777353e584fb6e1c1"></a><!-- doxytag: member="zookeeper.h::zookeeper_interest" ref="a56fef9c216e6dce777353e584fb6e1c1" args="(zhandle_t *zh, int *fd, int *interest, struct timeval *tv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zookeeper_interest </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>interest</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">struct timeval *&#160;</td>
          <td class="paramname"><em>tv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the events that zookeeper is interested in. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">fd</td><td>is the file descriptor of interest </td></tr>
    <tr><td class="paramname">interest</td><td>is an or of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags to indicate the I/O of interest on fd. </td></tr>
    <tr><td class="paramname">tv</td><td>a timeout value to be used with select/poll system call </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a result code. ZOK - success ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZCONNECTIONLOSS - a network error occured while attempting to establish a connection to the server ZMARSHALLINGERROR - failed to marshall a request; possibly, out of memory ZOPERATIONTIMEOUT - hasn't received anything from the server for 2/3 of the timeout value specified in <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de" title="create a handle to used communicate with zookeeper.">zookeeper_init()</a> ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details </dd></dl>

</div>
</div>
<a class="anchor" id="a077c33ef2fa1ab1fcacc2fa62d9d2dee"></a><!-- doxytag: member="zookeeper.h::zookeeper_process" ref="a077c33ef2fa1ab1fcacc2fa62d9d2dee" args="(zhandle_t *zh, int events)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI int zookeeper_process </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="zookeeper_8h.html#abbb713010da1056bae16baf23495d3ca">zhandle_t</a> *&#160;</td>
          <td class="paramname"><em>zh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>events</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Notifies zookeeper that an event of interest has happened. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">zh</td><td>the zookeeper handle obtained by a call to <a class="el" href="zookeeper_8h.html#a484b8767fa8f150cd15923fabafa90de">zookeeper_init</a> </td></tr>
    <tr><td class="paramname">events</td><td>will be an OR of the ZOOKEEPER_WRITE and ZOOKEEPER_READ flags. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a result code. ZOK - success ZBADARGUMENTS - invalid input parameters ZINVALIDSTATE - zhandle state is either ZOO_SESSION_EXPIRED_STATE or ZOO_AUTH_FAILED_STATE ZCONNECTIONLOSS - a network error occured while attempting to send request to server ZSESSIONEXPIRED - connection attempt failed -- the session's expired ZAUTHFAILED - authentication request failed, e.i. invalid credentials ZRUNTIMEINCONSISTENCY - a server response came out of order ZSYSTEMERROR -- a system (OS) error occured; it's worth checking errno to get details ZNOTHING -- not an error; simply indicates that there no more data from the server to be processed (when called with ZOOKEEPER_READ flag). </dd></dl>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a1b791c9c72613592267f0272832e61d5"></a><!-- doxytag: member="zookeeper.h::ZOO_ANYONE_ID_UNSAFE" ref="a1b791c9c72613592267f0272832e61d5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI struct Id <a class="el" href="zookeeper_8h.html#a1b791c9c72613592267f0272832e61d5">ZOO_ANYONE_ID_UNSAFE</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This Id represents anyone. </p>

</div>
</div>
<a class="anchor" id="a0821b8d404588c3a0e6a053e0fed5b94"></a><!-- doxytag: member="zookeeper.h::ZOO_AUTH_IDS" ref="a0821b8d404588c3a0e6a053e0fed5b94" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI struct Id <a class="el" href="zookeeper_8h.html#a0821b8d404588c3a0e6a053e0fed5b94">ZOO_AUTH_IDS</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This Id is only usable to set ACLs. It will get substituted with the Id's the client authenticated with. </p>

</div>
</div>
<a class="anchor" id="a306c30235e0a593c1fe69c6638d2f7a5"></a><!-- doxytag: member="zookeeper.h::ZOO_CHANGED_EVENT" ref="a306c30235e0a593c1fe69c6638d2f7a5" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#a306c30235e0a593c1fe69c6638d2f7a5">ZOO_CHANGED_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a node has changed. </p>
<p>This is only generated by watches on nodes. These watches are set using <a class="el" href="zookeeper_8h.html#a70bb2108d1d1646a8379135630fc9195">zoo_exists</a> and <a class="el" href="zookeeper_8h.html#a9b2b234acbe429205757b86bb4f042f4">zoo_get</a>. </p>

</div>
</div>
<a class="anchor" id="a38921e47ffd8ba887d38a47dbc538340"></a><!-- doxytag: member="zookeeper.h::ZOO_CHILD_EVENT" ref="a38921e47ffd8ba887d38a47dbc538340" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#a38921e47ffd8ba887d38a47dbc538340">ZOO_CHILD_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a change as occurred in the list of children. </p>
<p>This is only generated by watches on the child list of a node. These watches are set using <a class="el" href="zookeeper_8h.html#a281c9de9e479dbcc364f76dd24c2ee15">zoo_get_children</a>. </p>

</div>
</div>
<a class="anchor" id="a5d6848e9747568219ec887b5bd6a9311"></a><!-- doxytag: member="zookeeper.h::ZOO_CREATED_EVENT" ref="a5d6848e9747568219ec887b5bd6a9311" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#a5d6848e9747568219ec887b5bd6a9311">ZOO_CREATED_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a node has been created. </p>
<p>This is only generated by watches on non-existent nodes. These watches are set using <a class="el" href="zookeeper_8h.html#a70bb2108d1d1646a8379135630fc9195">zoo_exists</a>. </p>

</div>
</div>
<a class="anchor" id="a8952fa6cdcf5ae1ed59a516701f6f450"></a><!-- doxytag: member="zookeeper.h::ZOO_CREATOR_ALL_ACL" ref="a8952fa6cdcf5ae1ed59a516701f6f450" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI struct ACL_vector <a class="el" href="zookeeper_8h.html#a8952fa6cdcf5ae1ed59a516701f6f450">ZOO_CREATOR_ALL_ACL</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This ACL gives the creators authentication id's all permissions. </p>

</div>
</div>
<a class="anchor" id="af183916e0570f387ac298a46c1d21e50"></a><!-- doxytag: member="zookeeper.h::ZOO_DELETED_EVENT" ref="af183916e0570f387ac298a46c1d21e50" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#af183916e0570f387ac298a46c1d21e50">ZOO_DELETED_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a node has been deleted. </p>
<p>This is only generated by watches on nodes. These watches are set using <a class="el" href="zookeeper_8h.html#a70bb2108d1d1646a8379135630fc9195">zoo_exists</a> and <a class="el" href="zookeeper_8h.html#a9b2b234acbe429205757b86bb4f042f4">zoo_get</a>. </p>

</div>
</div>
<a class="anchor" id="a10c6fbbf2c9a81209f0b971b2b563006"></a><!-- doxytag: member="zookeeper.h::ZOO_NOTWATCHING_EVENT" ref="a10c6fbbf2c9a81209f0b971b2b563006" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#a10c6fbbf2c9a81209f0b971b2b563006">ZOO_NOTWATCHING_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a watch has been removed. </p>
<p>This is generated when the server for some reason, probably a resource constraint, will no longer watch a node for a client. </p>

</div>
</div>
<a class="anchor" id="af705e7757024bed308db5f51fb66d206"></a><!-- doxytag: member="zookeeper.h::ZOO_OPEN_ACL_UNSAFE" ref="af705e7757024bed308db5f51fb66d206" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI struct ACL_vector <a class="el" href="zookeeper_8h.html#af705e7757024bed308db5f51fb66d206">ZOO_OPEN_ACL_UNSAFE</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This is a completely open ACL </p>

</div>
</div>
<a class="anchor" id="a6028ec3420071b8ede5913c88b498eb9"></a><!-- doxytag: member="zookeeper.h::ZOO_READ_ACL_UNSAFE" ref="a6028ec3420071b8ede5913c88b498eb9" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI struct ACL_vector <a class="el" href="zookeeper_8h.html#a6028ec3420071b8ede5913c88b498eb9">ZOO_READ_ACL_UNSAFE</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>This ACL gives the world the ability to read. </p>

</div>
</div>
<a class="anchor" id="a31b6a709716ac3317f76f59e49db0e3a"></a><!-- doxytag: member="zookeeper.h::ZOO_SESSION_EVENT" ref="a31b6a709716ac3317f76f59e49db0e3a" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ZOOAPI const int <a class="el" href="zookeeper_8h.html#a31b6a709716ac3317f76f59e49db0e3a">ZOO_SESSION_EVENT</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>a session has been lost. </p>
<p>This is generated when a client loses contact or reconnects with a server. </p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Mon Feb 7 2011 03:42:48 for zookeeper-3.2.1 by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.3 </small></address>
</body>
</html>