code: private synchronized Stat getNodeStats(String node) throws IOException,
        KeeperException, InterruptedException {
      int failures = 0;
      boolean gotStats = false;
      Stat res = null;
      while (!gotStats) {
        initZK();
        try {
          res = zk.exists(node, watch);
          // Since stats can be null we have to control the execution with a flag
          gotStats = true;
        } catch (KeeperException kex) {
          if (KeeperException.Code.CONNECTIONLOSS == kex.code()
              && failures < ZK_CONNECTION_RETRIES) {
            failures++;
            continue;
          }
          throw kex;
        } finally {
        }
      }
      return res;
    }
docs: Gets the {@link Stat} of the node. Will create and destroy connection if
  the AvatarZooKeeperClient is not configured to set watchers
  
  @param node
  the path of zNode to get {@link Stat} for
  @return {@link Stat} of the node
  @throws IOException
  @throws KeeperException
  @throws InterruptedException