@InterfaceAudience.Private public class ZKClusterId extends Object
构造器和说明 |
---|
ZKClusterId(ZooKeeperWatcher watcher,
Abortable abortable) |
限定符和类型 | 方法和说明 |
---|---|
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) |
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–2022 The Apache Software Foundation. All rights reserved.