// TODO: Needs to handle AuthFailed, SaslAuthenticated events
switch (event.getState()) {
case SyncConnected:
LOG.info("ZooKeeper client is connected now.");
clientConnectLatch.countDown();
break;
case Disconnected:
LOG.info("ZooKeeper client is disconnected from zookeeper now, but it is OK unless we received EXPIRED event.");
break;
case Expired:
clientConnectLatch = new CountDownLatch(1);
LOG.error("ZooKeeper client connection to the ZooKeeper server has expired!");
break;
default:
// do nothing
break;
}
FEATURE REQUEST
Address TODO item in ZooKeeperWatcherBase:
nice-to-have
N/A