@InterfaceAudience.Private public class ZKClusterId extends Object
Modifier and Type | Field and Description |
---|---|
private Abortable |
abortable |
private String |
id |
private ZKWatcher |
watcher |
Constructor and Description |
---|
ZKClusterId(ZKWatcher watcher,
Abortable abortable) |
Modifier and Type | Method and Description |
---|---|
String |
getId() |
static UUID |
getUUIDForCluster(ZKWatcher zkw)
Get the UUID for the provided ZK watcher.
|
boolean |
hasId() |
static String |
readClusterIdZNode(ZKWatcher watcher) |
static void |
setClusterId(ZKWatcher watcher,
ClusterId id) |
public ZKClusterId(ZKWatcher watcher, Abortable abortable)
public boolean hasId()
public static String readClusterIdZNode(ZKWatcher watcher) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static void setClusterId(ZKWatcher watcher, ClusterId id) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperException
public static UUID getUUIDForCluster(ZKWatcher zkw) throws org.apache.zookeeper.KeeperException
zkw
- watcher connected to an ensembleorg.apache.zookeeper.KeeperException
- if a ZooKeeper operation failsCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.