public class ZkConnectionManagerImpl extends Object implements ZkConnectionManager
| Constructor and Description |
|---|
ZkConnectionManagerImpl(ZooKeeperFactory zooKeeperFactory,
int connectTimeoutMillis,
int retryIntervalMillis) |
| Modifier and Type | Method and Description |
|---|---|
ZooKeeperIface |
getClient()
Returns a valid ZooKeeperIface client that may be used to communicate
with the ZooKeeper cluster.
|
org.apache.zookeeper.ZooKeeper.States |
registerWatcher(org.apache.zookeeper.Watcher watcher)
Registers an additional watcher to receive ZooKeeper connection
event callbacks.
|
void |
shutdown()
Kills any active connections and shuts down the ZooKeeper connection
manager.
|
void |
start() |
public ZkConnectionManagerImpl(ZooKeeperFactory zooKeeperFactory, int connectTimeoutMillis, int retryIntervalMillis)
public void start()
public ZooKeeperIface getClient() throws InterruptedException
ZkConnectionManagergetClient in interface ZkConnectionManagerInterruptedExceptionpublic org.apache.zookeeper.ZooKeeper.States registerWatcher(org.apache.zookeeper.Watcher watcher)
ZkConnectionManagerregisterWatcher in interface ZkConnectionManagerpublic void shutdown()
throws InterruptedException
ZkConnectionManagershutdown in interface ZkConnectionManagerInterruptedExceptionCopyright © 2012–2015 Facebook, Inc.. All rights reserved.