public class ZkDynamicConfig extends Object
/zookeeper/config.| 限定符和类型 | 类和说明 |
|---|---|
static class |
ZkDynamicConfig.Server
Object representing one line in Zk dynamic config
|
| 限定符和类型 | 字段和说明 |
|---|---|
static Pattern |
linePattern |
| 限定符和类型 | 方法和说明 |
|---|---|
static ZkDynamicConfig |
fromZkConnectString(String zkHost)
Creates an instance based on a zookeeper connect string on format
host:port,host:port[/chroot] |
List<ZkDynamicConfig.Server> |
getServers() |
String |
getVersion() |
static ZkDynamicConfig |
parseLines(String lines)
Parse a raw multi line config string with the full content of znode /zookeeper/config.
|
int |
size() |
public static final Pattern linePattern
public static ZkDynamicConfig parseLines(String lines)
lines - the multi line config string. If empty or null, this will return an empty listpublic static ZkDynamicConfig fromZkConnectString(String zkHost)
host:port,host:port[/chroot]zkHost - zk connect stringpublic List<ZkDynamicConfig.Server> getServers()
public String getVersion()
public int size()
Copyright © 2006–2022 The Apache Software Foundation. All rights reserved.