@Override
  public boolean waitToBeConnected(long timeout) throws InterruptedException {

    if (Thread.interrupted()) {
      throw new InterruptedException();
    }

    checkConnectCalled();

    long start = System.currentTimeMillis();
    while (System.currentTimeMillis() - start < timeout) {
      if (gfManagerAgent.isInitialized()) {
        return true;

      } else {
        Thread.sleep(100);
      }
    }

    return isConnected();
  }
Polls to determine whether or not the connection to the distributed system has been made.
geode-core/src/main/java/org/apache/geode/admin/internal/AdminDistributedSystemImpl.java