org.I0Itec.zkclient
Class ZkConnection
java.lang.Object
org.I0Itec.zkclient.ZkConnection
- All Implemented Interfaces:
- IZkConnection
public class ZkConnection
- extends Object
- implements IZkConnection
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ZkConnection
public ZkConnection(String zkServers)
ZkConnection
public ZkConnection(String zkServers,
int sessionTimeOut)
connect
public void connect(org.apache.zookeeper.Watcher watcher)
- Specified by:
connect in interface IZkConnection
close
public void close()
throws InterruptedException
- Specified by:
close in interface IZkConnection
- Throws:
InterruptedException
create
public String create(String path,
byte[] data,
org.apache.zookeeper.CreateMode mode)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
create in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
delete
public void delete(String path)
throws InterruptedException,
org.apache.zookeeper.KeeperException
- Specified by:
delete in interface IZkConnection
- Throws:
InterruptedException
org.apache.zookeeper.KeeperException
exists
public boolean exists(String path,
boolean watch)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
exists in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
getChildren
public List<String> getChildren(String path,
boolean watch)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
getChildren in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
readData
public byte[] readData(String path,
org.apache.zookeeper.data.Stat stat,
boolean watch)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
readData in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
writeData
public void writeData(String path,
byte[] data)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
writeData
public void writeData(String path,
byte[] data,
int version)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
writeData in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
getZookeeperState
public org.apache.zookeeper.ZooKeeper.States getZookeeperState()
- Specified by:
getZookeeperState in interface IZkConnection
getZookeeper
public org.apache.zookeeper.ZooKeeper getZookeeper()
getCreateTime
public long getCreateTime(String path)
throws org.apache.zookeeper.KeeperException,
InterruptedException
- Specified by:
getCreateTime in interface IZkConnection
- Throws:
org.apache.zookeeper.KeeperException
InterruptedException
getServers
public String getServers()
- Specified by:
getServers in interface IZkConnection
Copyright © 2011. All Rights Reserved.