\brief checks the existence of a node in zookeeper.
This function is similar to \ref 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.
\param zh the zookeeper handle obtained by a call to \ref zookeeper_init
\param path the name of the node. Expressed as a file name with slashes
separating ancestors of the node.
\param watcher 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.
\param watcherCtx user specific data, will be passed to the watcher callback.
Unlike the global context set by \ref zookeeper_init, this watcher context
is associated with the given instance of the watcher only.
\param completion 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 successfully
ZNONODE the node does not exist.
ZNOAUTH the client does not have permission.
\param data the data that will be passed to the completion routine when the
function completes.
\return 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
\brief checks the existence of a node in zookeeper.
This function is similar to \ref 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.
\param zh the zookeeper handle obtained by a call to \ref zookeeper_init \param path the name of the node. Expressed as a file name with slashes separating ancestors of the node. \param watcher 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. \param watcherCtx user specific data, will be passed to the watcher callback. Unlike the global context set by \ref zookeeper_init, this watcher context is associated with the given instance of the watcher only. \param completion 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 successfully ZNONODE the node does not exist. ZNOAUTH the client does not have permission. \param data the data that will be passed to the completion routine when the function completes. \return 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