zoo_acreate

\brief create a node.

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. The sequence number is always fixed length of 10 digits, 0 padded.

\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 value The data to be stored in the node. \param valuelen The number of bytes in data. \param acl The initial ACL of the node. The ACL must not be null or empty. \param flags this parameter can be set to 0 for normal create or an OR of the Create Flags \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 parent node does not exist. ZNODEEXISTS the node already exists ZNOAUTH the client does not have permission. ZNOCHILDRENFOREPHEMERALS cannot create children of ephemeral nodes. \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

extern (C)
int
zoo_acreate
(,
const char* path
,
const char* value
,,,
int flags
,,
const void* data
)

Meta