public class ZKStore extends Object implements KVStore
| 构造器和说明 |
|---|
ZKStore(org.apache.zookeeper.ZooKeeper zooKeeper) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
void |
createParentNode(String parentNode) |
long |
delete(String key) |
boolean |
exists(String key) |
Node |
get(String key) |
List<Node> |
list(String prefix) |
List<String> |
listKeys(String prefix) |
long |
put(String key,
String value) |
long |
put(String key,
String value,
boolean ephemeral) |
void |
watchChildren(String key,
java.util.function.BiConsumer<Event,Node> consumer) |
void |
watchChildren(String key,
java.util.function.Supplier<Boolean> exitSignSupplier,
java.util.function.BiConsumer<Event,Node> consumer) |
public void watchChildren(String key, java.util.function.BiConsumer<Event,Node> consumer) throws Exception
watchChildren 在接口中 KVStoreExceptionpublic void watchChildren(String key, java.util.function.Supplier<Boolean> exitSignSupplier, java.util.function.BiConsumer<Event,Node> consumer) throws Exception
watchChildren 在接口中 KVStoreExceptionpublic void createParentNode(String parentNode) throws Exception
createParentNode 在接口中 KVStoreExceptionpublic void close()
throws Exception
close 在接口中 AutoCloseableExceptionCopyright © 2018. All rights reserved.