public class

ZkClient

extends ZkClient
java.lang.Object
   ↳ org.I0Itec.zkclient.ZkClient
     ↳ org.apache.helix.manager.zk.ZkClient

Class Overview

ZKClient does not provide some functionalities, this will be used for quick fixes if any bug found in ZKClient or if we need additional features but can't wait for the new ZkClient jar Ideally we should commit the changes we do here to ZKClient.

Summary

Constants
int DEFAULT_CONNECTION_TIMEOUT
int DEFAULT_SESSION_TIMEOUT
[Expand]
Inherited Fields
From class org.I0Itec.zkclient.ZkClient
Public Constructors
ZkClient(IZkConnection connection, int connectionTimeout, PathBasedZkSerializer zkSerializer)
ZkClient(IZkConnection connection, int connectionTimeout, ZkSerializer zkSerializer)
ZkClient(IZkConnection connection, int connectionTimeout)
ZkClient(IZkConnection connection)
ZkClient(String zkServers, int sessionTimeout, int connectionTimeout, ZkSerializer zkSerializer)
ZkClient(String zkServers, int sessionTimeout, int connectionTimeout, PathBasedZkSerializer zkSerializer)
ZkClient(String zkServers, int sessionTimeout, int connectionTimeout)
ZkClient(String zkServers, int connectionTimeout)
ZkClient(String zkServers)
Public Methods
void asyncCreate(String path, Object datat, CreateMode mode, ZkAsyncCallbacks.CreateCallbackHandler cb)
void asyncDelete(String path, ZkAsyncCallbacks.DeleteCallbackHandler cb)
void asyncExists(String path, ZkAsyncCallbacks.ExistsCallbackHandler cb)
void asyncGetData(String path, ZkAsyncCallbacks.GetDataCallbackHandler cb)
void asyncSetData(String path, Object datat, int version, ZkAsyncCallbacks.SetDataCallbackHandler cb)
void close()
String create(String path, Object data, CreateMode mode)
boolean delete(String path)
boolean delete(String path, int version)
<T> T deserialize(byte[] data, String path)
IZkConnection getConnection()
String getServers()
Stat getStat(String path)
<T> T readDataAndStat(String path, Stat stat, boolean returnNullIfPathNotExists)
byte[] serialize(Object data, String path)
void setZkSerializer(PathBasedZkSerializer zkSerializer)
void setZkSerializer(ZkSerializer zkSerializer)
void writeData(String path, Object datat, int expectedVersion)
Stat writeDataGetStat(String path, Object datat, int expectedVersion)
Protected Methods
boolean exists(String path, boolean watch)
List<String> getChildren(String path, boolean watch)
<T> T readData(String path, Stat stat, boolean watch)
[Expand]
Inherited Methods
From class org.I0Itec.zkclient.ZkClient
From class java.lang.Object
From interface org.apache.zookeeper.Watcher

Constants

public static final int DEFAULT_CONNECTION_TIMEOUT

Constant Value: 60000 (0x0000ea60)

public static final int DEFAULT_SESSION_TIMEOUT

Constant Value: 30000 (0x00007530)

Public Constructors

public ZkClient (IZkConnection connection, int connectionTimeout, PathBasedZkSerializer zkSerializer)

public ZkClient (IZkConnection connection, int connectionTimeout, ZkSerializer zkSerializer)

public ZkClient (IZkConnection connection, int connectionTimeout)

public ZkClient (IZkConnection connection)

public ZkClient (String zkServers, int sessionTimeout, int connectionTimeout, ZkSerializer zkSerializer)

public ZkClient (String zkServers, int sessionTimeout, int connectionTimeout, PathBasedZkSerializer zkSerializer)

public ZkClient (String zkServers, int sessionTimeout, int connectionTimeout)

public ZkClient (String zkServers, int connectionTimeout)

public ZkClient (String zkServers)

Public Methods

public void asyncCreate (String path, Object datat, CreateMode mode, ZkAsyncCallbacks.CreateCallbackHandler cb)

public void asyncDelete (String path, ZkAsyncCallbacks.DeleteCallbackHandler cb)

public void asyncExists (String path, ZkAsyncCallbacks.ExistsCallbackHandler cb)

public void asyncGetData (String path, ZkAsyncCallbacks.GetDataCallbackHandler cb)

public void asyncSetData (String path, Object datat, int version, ZkAsyncCallbacks.SetDataCallbackHandler cb)

public void close ()

Throws
ZkInterruptedException

public String create (String path, Object data, CreateMode mode)

Throws
ZkInterruptedException
IllegalArgumentException
ZkException
RuntimeException

public boolean delete (String path)

public boolean delete (String path, int version)

public T deserialize (byte[] data, String path)

public IZkConnection getConnection ()

public String getServers ()

public Stat getStat (String path)

public T readDataAndStat (String path, Stat stat, boolean returnNullIfPathNotExists)

public byte[] serialize (Object data, String path)

public void setZkSerializer (PathBasedZkSerializer zkSerializer)

public void setZkSerializer (ZkSerializer zkSerializer)

public void writeData (String path, Object datat, int expectedVersion)

public Stat writeDataGetStat (String path, Object datat, int expectedVersion)

Protected Methods

protected boolean exists (String path, boolean watch)

protected List<String> getChildren (String path, boolean watch)

protected T readData (String path, Stat stat, boolean watch)