public class ZkClient extends Object
| Constructor and Description |
|---|
ZkClient(String zkConn)
zookeeper client, connection string
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
close the zk driver
|
void |
create(String path,
String data)
create the path and data
|
void |
create(String path,
String data,
org.apache.zookeeper.CreateMode mode)
reload func
|
void |
createR(String path,
String data)
recursively create
|
void |
delete(String path)
delete the zk node
|
boolean |
exists(String path)
the string path is exists
|
boolean |
existsR(String path)
recursively check
|
String |
get(String path)
getOrigin the zookeeper node
|
List<String> |
getChildren(String path)
getOrigin children node
|
void |
set(String path,
String data)
set the zookeeper node
|
void |
setR(String path,
String data)
set recursively the process same as createR
|
public boolean exists(String path) throws Exception
path - Exceptionpublic boolean existsR(String path) throws Exception
path - Exceptionpublic void create(String path, String data) throws Exception
path - data - Exceptionpublic void create(String path, String data, org.apache.zookeeper.CreateMode mode) throws Exception
path - data - Exceptionpublic void createR(String path, String data) throws Exception
path - data - Exceptionpublic void set(String path, String data) throws Exception
path - data - Exceptionpublic void setR(String path, String data) throws Exception
path - data - Exceptionpublic String get(String path) throws Exception
path - Exceptionpublic List<String> getChildren(String path) throws Exception
path - ExceptionCopyright © 2016. All rights reserved.