Add the specified Auth(scheme:data) information to this connection.
Add the specified Auth(scheme:data) information to this connection.
an Auth
Future[Unit] or Exception
Should add some new servers to the host list
Should try to connect to a new host if possible.
Should try to connect to a new host if possible. This operation will interrupt request sending until a new connection and a new session are established
the server to connect to
Future.Done or Exception
Checks if a watcher event is still not triggered.
Checks if a watcher event is still not triggered.
a watcher to test
Future[Unit] if the watcher is ok, or else ZooKeeperException
Checks if the watches on a znode for this watcher type are not triggered on the server side.
Checks if the watches on a znode for this watcher type are not triggered on the server side.
the path to the znode
the watcher type (children, data, any)
Future[Unit] if the watches are ok, or else ZooKeeperException
3.5.0
Stops background jobs and closes the connection.
Stops background jobs and closes the connection. Should be used after closing the session.
a deadline for closing
Future[Unit] or Exception
Stops background jobs and closes the connection.
Stops background jobs and closes the connection. Should be used after closing the session.
Future[Unit] or Exception
Closes the session and stops background jobs.
Closes the session and stops background jobs.
Future[Unit] or Exception
Connects to a host or finds an available server, then creates a session.
Connects to a host or finds an available server, then creates a session.
a server to connect to
Future[Unit] or Exception
Create a node with the given path.
Create a node with the given path. The node data will be the given data, and node acl will be the given acl.
the path for the node
the initial data for the node
the acl for the node
specifying whether the node to be created is ephemeral and/or sequential
Future[String] or Exception
Create a node with the given path.
Create a node with the given path. The node data will be the given data, and node acl will be the given acl.
the path for the node
the initial data for the node
the acl for the node
specifying whether the node to be created is ephemeral and/or sequential
Future[Create2Response] or Exception
3.5.0
Delete the node with the given path.
Delete the node with the given path. The call will succeed if such a node exists, and the given version matches the node's version (if the given version is -1, it matches any node's versions).
the path of the node to be deleted.
the expected node version.
Future[Unit] or Exception
Return the stat of the node of the given path.
Return the stat of the node of the given path. Return null if no such a node exists.
If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that creates/delete the node or sets the data on the node.
the node path
a boolean to set a watch or not
an ExistsReponse
Return the ACL and stat of the node of the given path.
Return the ACL and stat of the node of the given path.
the node path
Future[GetACLResponse] or Exception
For the given znode path return the stat and children list.
For the given znode path return the stat and children list.
If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that deletes the node of the given path or creates/delete a child under the node.
the node path
a boolean to set a watch or not
Future[GetChildrenResponse] or Exception
For the given znode path return the stat and children list.
For the given znode path return the stat and children list.
If the watch is true and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that deletes the node of the given path or creates/delete a child under the node.
the node path
a boolean to set a watch or not
Future[GetChildren2Response] or Exception
Return the last committed configuration (as known to the server to which the client is connected) and the stat of the configuration.
Return the last committed configuration (as known to the server to which the client is connected) and the stat of the configuration.
If the watch is true and the call is successful (no exception is thrown), a watch will be left on the configuration node. The watch will be triggered by a successful reconfig operation.
set a watch or not
configuration node data
3.5.0
Return the data and the stat of the node of the given path.
Return the data and the stat of the node of the given path.
If the watch is non-null and the call is successful (no exception is thrown), a watch will be left on the node with the given path. The watch will be triggered by a successful operation that sets data on the node, or deletes the node.
the node path
a boolean to set a watch or not
Future[GetDataResponse] or Exception
Reconfigure - add/remove servers.
Reconfigure - add/remove servers. Return the new configuration.
a comma separated list of servers being added (incremental reconfiguration)
a comma separated list of servers being removed (incremental reconfiguration)
a comma separated list of new membership (non-incremental reconfiguration)
version of the current configuration (optional - causes reconfiguration to throw an exception if configuration is no longer current)
configuration node data
3.5.0
For the given znode path, removes all the registered watchers of given watcherType.
For the given znode path, removes all the registered watchers of given watcherType.
the node path
the watcher type (children, data, any)
whether watches can be removed locally when there is no server connection.
Future[Unit]
3.5.0
Should remove some hosts from the host list
Should remove some hosts from the host list
hosts to remove
Future.Done or Exception
For the given znode path, removes the specified watcher.
For the given znode path, removes the specified watcher.
the watcher to be removed
whether watches can be removed locally when there is no server connection.
Future[Unit]
3.5.0
Set the ACL for the node of the given path if such a node exists and the given version matches the version of the node.
Set the ACL for the node of the given path if such a node exists and the given version matches the version of the node. Return the stat of the node.
the node path
the ACLs to set
the node version
the new znode stat
Set the data for the node of the given path if such a node exists and the given version matches the version of the node (if the given version is -1, it matches any node's versions).
Set the data for the node of the given path if such a node exists and the given version matches the version of the node (if the given version is -1, it matches any node's versions). Return the stat of the node.
This operation, if successful, will trigger all the watches on the node of the given path left by getData calls.
The maximum allowable size of the data array is 1 MB (1,048,576 bytes). Arrays larger than this will cause a ZooKeeperException to be thrown.
the node path
the data Array
the node version
the new znode stat
Should start to search a RW mode server.
Should start to search a RW mode server.
Future.Done
Start the loop which will check connection and session every timeBetweenLinkCheck
Start the loop which will check connection and session every timeBetweenLinkCheck
Should stop Rw mode server search.
Should stop Rw mode server search.
Future.Done
Stop the state loop by cancelling its scheduler task
Stop the state loop by cancelling its scheduler task
Synchronize client and server for a node.
Synchronize client and server for a node.
the node path
the synchronized znode's path
Executes multiple ZooKeeper operations or none of them.
Executes multiple ZooKeeper operations or none of them.
On success, a list of results is returned. On failure, an exception is raised which contains partial results and error details. OpRequest: - CheckVersionRequest - CreateRequest - Create2Request (available in v3.5.0) - DeleteRequest - SetDataRequest
a Sequence composed of OpRequest
Future[TransactionResponse] or Exception