public final class PathTree extends Object implements AutoCloseable
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
delete(String path)
Delete node.
|
List<String> |
getChildren(String path)
Get children.
|
byte[] |
getValue(String path)
Get node value.
|
void |
load()
Load data.
|
void |
put(String path,
String value)
Put node.
|
void |
refreshPeriodic(long period)
Start thread pool period load data.
|
void |
stopRefresh()
Stop thread pool period load data.
|
void |
watch()
Watch data change.
|
void |
watch(ZookeeperEventListener zookeeperEventListener)
Watch data change.
|
public void load()
throws org.apache.zookeeper.KeeperException,
InterruptedException
org.apache.zookeeper.KeeperException - Zookeeper ExceptionInterruptedException - InterruptedExceptionpublic void refreshPeriodic(long period)
period - periodpublic void stopRefresh()
public void watch()
public void watch(ZookeeperEventListener zookeeperEventListener)
zookeeperEventListener - listenerpublic byte[] getValue(String path)
path - pathpublic void delete(String path)
path - pathpublic void close()
close 在接口中 AutoCloseableCopyright © 2018. All rights reserved.