_eventThread.start();
_connection.connect(watcher);
LOG.debug("Awaiting connection to Zookeeper server");
if (!waitUntilConnected(maxMsToWaitUntilConnected, TimeUnit.MILLISECONDS)) {
throw new ZkTimeoutException("Unable to connect to zookeeper server within timeout: " + maxMsToWaitUntilConnected);
}
started = true;
} catch (InterruptedException e) {
States state = _connection.getZookeeperState();
throw new IllegalStateException("Not connected with zookeeper server yet. Current state is " + state);