public class MockZkConnectionManager extends Object implements ZkConnectionManager
| Constructor and Description |
|---|
MockZkConnectionManager(ZooKeeperFactory zooKeeperFactory) |
| Modifier and Type | Method and Description |
|---|---|
ZooKeeperIface |
getClient()
Returns a valid ZooKeeperIface client that may be used to communicate
with the ZooKeeper cluster.
|
void |
refreshClient() |
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.
|
public MockZkConnectionManager(ZooKeeperFactory zooKeeperFactory)
public void refreshClient()
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.