public class MasterZooKeeperRegistrar extends Object implements ZooKeeperRegistrar
| Constructor and Description |
|---|
MasterZooKeeperRegistrar(String name) |
| Modifier and Type | Method and Description |
|---|---|
void |
shutDown()
Called upon shutdown
|
void |
startUp()
Called upon startup
|
boolean |
tryToRegister(ZooKeeperClient client)
Called when ZK client connects.
|
public MasterZooKeeperRegistrar(String name)
public void startUp()
throws Exception
ZooKeeperRegistrarstartUp in interface ZooKeeperRegistrarException - If an unexpected error occurs.public void shutDown()
throws Exception
ZooKeeperRegistrarshutDown in interface ZooKeeperRegistrarException - If an unexpected error occurs.public boolean tryToRegister(ZooKeeperClient client) throws org.apache.zookeeper.KeeperException
ZooKeeperRegistrartryToRegister in interface ZooKeeperRegistrarclient - The zookeeper client.org.apache.zookeeper.KeeperException - If an unexpected zookeeper error occurs.Copyright © 2017. All rights reserved.