public class AgentZooKeeperRegistrar extends Object implements ZooKeeperRegistrar
| Constructor and Description |
|---|
AgentZooKeeperRegistrar(String name,
String id,
int zooKeeperRegistrationTtlMinutes,
com.spotify.helios.common.Clock clock) |
| 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 AgentZooKeeperRegistrar(String name, String id, int zooKeeperRegistrationTtlMinutes, com.spotify.helios.common.Clock clock)
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, HostNotFoundException
ZooKeeperRegistrartryToRegister in interface ZooKeeperRegistrarclient - The zookeeper client.org.apache.zookeeper.KeeperException - If an unexpected zookeeper error occurs.HostNotFoundException - If the hostname we are trying to re-register as doesn't exist.Copyright © 2017. All rights reserved.