@Override public void process(final WatchedEvent event) { LOG.debug("process: Got a new event, path = {}, type = {}, state = {}", event.getPath(), event.getType(), event.getState()); if((event.getPath() == null) && (event.getType() == EventType.None)) { if(event.getState() == KeeperState.SyncConnected) { LOG.info("process: Asynchronous connection complete."); this.getZkConnLatch().countDown(); } else { LOG.warn("process: Got unknown null path event {}.", event); } return; } }
setZooKeeper(new GuaguaZooKeeper(zkServers, sessionTimeout, maxRetryAttempts, retryWaitMsecs, this)); this.getZkConnLatch().await(); } catch (IOException e) { throw new GuaguaRuntimeException(e);