public void exist() throws KeeperException, InterruptedException{
stat = zk.exists(path, true);
System.out.println("exits:"+stat.getDataLength());
}
public void get() throws KeeperException, InterruptedException{
Stat stat = new Stat();
byte[] data = zk.getData(path, true, stat);
System.out.print(new String(data));
System.out.println(stat);
}
public void set() throws KeeperException, InterruptedException{
stat = zk.setData(path, "zk_ooxx".getBytes(), stat.getVersion());
}
public void delete() throws InterruptedException, KeeperException{
zk.delete(path, stat.getVersion());
}
public void close() throws InterruptedException{
zk.close();
}
public static void main(String[] args) throws Exception {
ZookeeperTestCase zkTest = new ZookeeperTestCase();