public class ZooKeeperRegistrarUtil extends Object
| Constructor and Description |
|---|
ZooKeeperRegistrarUtil() |
| Modifier and Type | Method and Description |
|---|---|
static void |
deregisterHost(ZooKeeperClient client,
String host) |
static boolean |
isHostRegistered(ZooKeeperClient client,
String host) |
static void |
registerHost(ZooKeeperClient client,
String idPath,
String hostname,
String hostId) |
static void |
reRegisterHost(ZooKeeperClient client,
String host,
String hostId)
Re-register an agent with a different host id.
|
public static boolean isHostRegistered(ZooKeeperClient client, String host)
public static void registerHost(ZooKeeperClient client, String idPath, String hostname, String hostId) throws org.apache.zookeeper.KeeperException
org.apache.zookeeper.KeeperExceptionpublic static void reRegisterHost(ZooKeeperClient client, String host, String hostId) throws HostNotFoundException, org.apache.zookeeper.KeeperException
client - ZooKeeperClienthost - HosthostId - ID of the hostHostNotFoundException - If the hostname we are trying to re-register as doesn't exist.org.apache.zookeeper.KeeperException - If an unexpected zookeeper error occurs.public static void deregisterHost(ZooKeeperClient client, String host) throws HostNotFoundException, HostStillInUseException
Copyright © 2017. All rights reserved.