public class ClusterID extends Object
| Constructor and Description |
|---|
ClusterID() |
| Modifier and Type | Method and Description |
|---|---|
static int |
get(org.apache.zookeeper.ZooKeeper zookeeper,
String znode)
Retrieves the numeric cluster ID from the ZooKeeper quorum.
|
public static int get(org.apache.zookeeper.ZooKeeper zookeeper,
String znode)
throws IOException
zookeeper - ZooKeeper instance to work with.IOException - Thrown when retrieving the ID fails.NumberFormatException - Thrown when the supposed ID found in the quorum could not be parsed as
an integer.Copyright © 2014–2020 Lable. All rights reserved.