Example usage for Java org.apache.zookeeper ZooKeeper fields, constructors, methods, implement or subclass
The text is from its open source code.
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, HostProvider aHostProvider) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, ZKClientConfig conf) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, ZKClientConfig conf) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, boolean canBeReadOnly, HostProvider aHostProvider, ZKClientConfig clientConfig) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. | |
ZooKeeper(String connectString, int sessionTimeout, Watcher watcher, long sessionId, byte[] sessionPasswd, boolean canBeReadOnly) To create a ZooKeeper client object, the application needs to pass a connection string containing a comma separated list of host:port pairs, each corresponding to a ZooKeeper server. |
void | addAuthInfo(String scheme, byte[] auth) Add the specified scheme:auth information to this connection. |
void | close() Close this client object. |
String | create(final String path, byte[] data, List Create a node with the given path. |
String | create(final String path, byte[] data, List same as #create(String,byte[],List,CreateMode,Stat) but allows for specifying a TTL when mode is CreateMode#PERSISTENT_WITH_TTL or CreateMode#PERSISTENT_SEQUENTIAL_WITH_TTL . |
void | create(final String path, byte[] data, List The asynchronous version of create. |
void | create(final String path, byte[] data, List The asynchronous version of create. |
void | create(final String path, byte[] data, List The asynchronous version of create with ttl. |
void | delete(final String path, int version) Delete the node with the given path. |
void | delete(final String path, int version, VoidCallback cb, Object ctx) The asynchronous version of delete. |
Stat | exists(final String path, Watcher watcher) Return the stat of the node of the given path. |
Stat | exists(String path, boolean watch) Return the stat of the node of the given path. |
void | exists(final String path, Watcher watcher, StatCallback cb, Object ctx) The asynchronous version of exists. |
void | exists(String path, boolean watch, StatCallback cb, Object ctx) The asynchronous version of exists. |
List | getACL(final String path, Stat stat) Return the ACL and stat of the node of the given path. |
void | getACL(final String path, Stat stat, ACLCallback cb, Object ctx) The asynchronous version of getACL. |
List | getChildren(final String path, Watcher watcher) Return the list of the children of the node of the given path. |
List | getChildren(String path, boolean watch) Return the list of the children of the node of the given path. |
List | getChildren(final String path, Watcher watcher, Stat stat) For the given znode path return the stat and children list. |
List | getChildren(String path, boolean watch, Stat stat) For the given znode path return the stat and children list. |
void | getChildren(final String path, Watcher watcher, ChildrenCallback cb, Object ctx) The asynchronous version of getChildren. |
void | getChildren(String path, boolean watch, ChildrenCallback cb, Object ctx) The asynchronous version of getChildren. |
void | getChildren(final String path, Watcher watcher, Children2Callback cb, Object ctx) The asynchronous version of getChildren. |
void | getChildren(String path, boolean watch, Children2Callback cb, Object ctx) The asynchronous version of getChildren. |
byte[] | getData(final String path, Watcher watcher, Stat stat) Return the data and the stat of the node of the given path. |
byte[] | getData(String path, boolean watch, Stat stat) Return the data and the stat of the node of the given path. |
void | getData(final String path, Watcher watcher, DataCallback cb, Object ctx) The asynchronous version of getData. |
void | getData(String path, boolean watch, DataCallback cb, Object ctx) The asynchronous version of getData. |
long | getSessionId() The session id for this ZooKeeper client instance. |
byte[] | getSessionPasswd() The session password for this ZooKeeper client instance. |
int | getSessionTimeout() The negotiated session timeout for this ZooKeeper client instance. |
States | getState() |
Testable | getTestable() |
List | multi(Iterable Executes multiple ZooKeeper operations. |
void | multi(Iterable The asynchronous version of multi. |
void | register(Watcher watcher) Specify the default watcher for the connection (overrides the one specified during construction). |
void | removeAllWatches(String path, WatcherType watcherType, boolean local) For the given znode path, removes all the registered watchers of given watcherType. |
void | removeAllWatches(String path, WatcherType watcherType, boolean local, VoidCallback cb, Object ctx) The asynchronous version of removeAllWatches. |
void | removeWatches(String path, Watcher watcher, WatcherType watcherType, boolean local) For the given znode path, removes the specified watcher of given watcherType. |
void | removeWatches(String path, Watcher watcher, WatcherType watcherType, boolean local, VoidCallback cb, Object ctx) The asynchronous version of removeWatches. |
Stat | setACL(final String path, List Set the ACL for the node of the given path if such a node exists and the given aclVersion matches the acl version of the node. |
void | setACL(final String path, List The asynchronous version of setACL. |
Stat | setData(final String path, byte[] data, int version) 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). |
void | setData(final String path, byte[] data, int version, StatCallback cb, Object ctx) The asynchronous version of setData. |
void | sync(final String path, VoidCallback cb, Object ctx) Asynchronous sync. |
String | toString() String representation of this ZooKeeper client. |
Transaction | transaction() A Transaction is a thin wrapper on the #multi method which provides a builder object that can be used to construct and commit an atomic set of operations. |