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) |
String |
getServerInfo() |
boolean |
isConnected() |
void |
unwatch(String path) |
void |
watch(String path,
Consumer<List<String>> listener) |
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 watch(String path, Consumer<List<String>> listener) throws Exception
Exceptionpublic void unwatch(String path)
public boolean isConnected()
public String getServerInfo()
public void close()
close 在接口中 Closeableclose 在接口中 AutoCloseableCopyright © 2025. All rights reserved.