Package org.apache.zookeeper.client
Class ConnectStringParser
java.lang.Object
org.apache.zookeeper.client.ConnectStringParser
A parser for ZooKeeper Client connect strings.
This class is not meant to be seen or used outside of ZooKeeper itself.
The chrootPath member should be replaced by a Path object in issue
ZOOKEEPER-849.
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionConnectStringParser(String connectString) Constructs a ConnectStringParser with given connect string. -
Method Summary
Modifier and TypeMethodDescription
-
Constructor Details
-
ConnectStringParser
Constructs a ConnectStringParser with given connect string.Supports two connection string formats:
- Host:Port format: "host1:2181,host2:2181/chroot"
- DNS SRV format: "dns-srv://service.domain.com/chroot"
- Parameters:
connectString- the connect string to parse- Throws:
IllegalArgumentException- if connectString is null/empty or contains invalid chroot path
-
-
Method Details
-
getChrootPath
-
getServerAddresses
-
getConnectionType
-
getConnectString
-