public class CuratorFrameworkClient extends Object implements Closeable
| 限定符和类型 | 类和说明 |
|---|---|
static interface |
CuratorFrameworkClient.ReconnectCallback |
| 构造器和说明 |
|---|
CuratorFrameworkClient(ZookeeperRegistryProperties config,
CuratorFrameworkClient.ReconnectCallback reconnectCallback) |
| 限定符和类型 | 方法和说明 |
|---|---|
boolean |
checkExists(String path) |
void |
close() |
void |
createEphemeral(String path,
byte[] data,
int retries) |
void |
createEphemeral(String path,
int retries) |
void |
createPersistent(String path) |
void |
createPersistent(String path,
byte[] data) |
void |
deletePath(String path) |
List<String> |
getChildren(String path) |
byte[] |
getData(String path) |
boolean |
isConnected() |
boolean |
unwatchChildChanged(String path) |
void |
watchChildChanged(String path,
CountDownLatch latch,
Consumer<List<String>> processor) |
public CuratorFrameworkClient(ZookeeperRegistryProperties config, CuratorFrameworkClient.ReconnectCallback reconnectCallback) throws Exception
Exceptionpublic void createEphemeral(String path, int retries) throws Exception
Exceptionpublic void createPersistent(String path, byte[] data) throws Exception
Exceptionpublic void createEphemeral(String path, byte[] data, int retries) throws Exception
Exceptionpublic boolean checkExists(String path)
public void watchChildChanged(String path, CountDownLatch latch, Consumer<List<String>> processor) throws Exception
Exceptionpublic boolean unwatchChildChanged(String path)
public boolean isConnected()
public void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2024. All rights reserved.