public class ZkDynamicConfig extends Object
/zookeeper/config
.Modifier and Type | Class and Description |
---|---|
static class |
ZkDynamicConfig.Server
Object representing one line in Zk dynamic config
|
Modifier and Type | Field and Description |
---|---|
static Pattern |
linePattern |
Modifier and Type | Method and Description |
---|---|
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 © 2000-2020 Apache Software Foundation. All Rights Reserved.