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