Java org.apache.zookeeper ZooKeeper fields, constructors, methods, implement or subclass

Example usage for Java org.apache.zookeeper ZooKeeper fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.zookeeper ZooKeeper.

The text is from its open source code.

Subclass

org.apache.zookeeper.ZooKeeper has subclasses.
Click this link to see all its subclasses.

Implementation

org.apache.zookeeper.ZooKeeper has the following implementations.
Click this link to see all its implementation.

Constructor

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.

Method

voidaddAuthInfo(String scheme, byte[] auth)
Add the specified scheme:auth information to this connection.
voidclose()
Close this client object.
Stringcreate(final String path, byte[] data, List acl, CreateMode createMode)
Create a node with the given path.
Stringcreate(final String path, byte[] data, List acl, CreateMode createMode, Stat stat, long ttl)
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 .
voidcreate(final String path, byte[] data, List acl, CreateMode createMode, StringCallback cb, Object ctx)
The asynchronous version of create.
voidcreate(final String path, byte[] data, List acl, CreateMode createMode, Create2Callback cb, Object ctx)
The asynchronous version of create.
voidcreate(final String path, byte[] data, List acl, CreateMode createMode, Create2Callback cb, Object ctx, long ttl)
The asynchronous version of create with ttl.
voiddelete(final String path, int version)
Delete the node with the given path.
voiddelete(final String path, int version, VoidCallback cb, Object ctx)
The asynchronous version of delete.
Statexists(final String path, Watcher watcher)
Return the stat of the node of the given path.
Statexists(String path, boolean watch)
Return the stat of the node of the given path.
voidexists(final String path, Watcher watcher, StatCallback cb, Object ctx)
The asynchronous version of exists.
voidexists(String path, boolean watch, StatCallback cb, Object ctx)
The asynchronous version of exists.
ListgetACL(final String path, Stat stat)
Return the ACL and stat of the node of the given path.
voidgetACL(final String path, Stat stat, ACLCallback cb, Object ctx)
The asynchronous version of getACL.
ListgetChildren(final String path, Watcher watcher)
Return the list of the children of the node of the given path.
ListgetChildren(String path, boolean watch)
Return the list of the children of the node of the given path.
ListgetChildren(final String path, Watcher watcher, Stat stat)
For the given znode path return the stat and children list.
ListgetChildren(String path, boolean watch, Stat stat)
For the given znode path return the stat and children list.
voidgetChildren(final String path, Watcher watcher, ChildrenCallback cb, Object ctx)
The asynchronous version of getChildren.
voidgetChildren(String path, boolean watch, ChildrenCallback cb, Object ctx)
The asynchronous version of getChildren.
voidgetChildren(final String path, Watcher watcher, Children2Callback cb, Object ctx)
The asynchronous version of getChildren.
voidgetChildren(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.
voidgetData(final String path, Watcher watcher, DataCallback cb, Object ctx)
The asynchronous version of getData.
voidgetData(String path, boolean watch, DataCallback cb, Object ctx)
The asynchronous version of getData.
longgetSessionId()
The session id for this ZooKeeper client instance.
byte[]getSessionPasswd()
The session password for this ZooKeeper client instance.
intgetSessionTimeout()
The negotiated session timeout for this ZooKeeper client instance.
StatesgetState()
TestablegetTestable()
Listmulti(Iterable ops)
Executes multiple ZooKeeper operations.
voidmulti(Iterable ops, MultiCallback cb, Object ctx)
The asynchronous version of multi.
voidregister(Watcher watcher)
Specify the default watcher for the connection (overrides the one specified during construction).
voidremoveAllWatches(String path, WatcherType watcherType, boolean local)
For the given znode path, removes all the registered watchers of given watcherType.
voidremoveAllWatches(String path, WatcherType watcherType, boolean local, VoidCallback cb, Object ctx)
The asynchronous version of removeAllWatches.
voidremoveWatches(String path, Watcher watcher, WatcherType watcherType, boolean local)
For the given znode path, removes the specified watcher of given watcherType.
voidremoveWatches(String path, Watcher watcher, WatcherType watcherType, boolean local, VoidCallback cb, Object ctx)
The asynchronous version of removeWatches.
StatsetACL(final String path, List acl, int aclVersion)
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.
voidsetACL(final String path, List acl, int version, StatCallback cb, Object ctx)
The asynchronous version of setACL.
StatsetData(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).
voidsetData(final String path, byte[] data, int version, StatCallback cb, Object ctx)
The asynchronous version of setData.
voidsync(final String path, VoidCallback cb, Object ctx)
Asynchronous sync.
StringtoString()
String representation of this ZooKeeper client.
Transactiontransaction()
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.