private boolean readyToConnect(){
  long now=System.currentTimeMillis();
  long lastExchangeMillis=mStore.getLong(LAST_EXCHANGE_TIME_KEY,-1);
  boolean timeSinceLastOK;
  if (lastExchangeMillis == -1) {
    timeSinceLastOK=true;
  }
 else   if (now - lastExchangeMillis < TIME_BETWEEN_EXCHANGES_MILLIS) {
    timeSinceLastOK=false;
  }
 else {
    timeSinceLastOK=true;
  }
  if (!USE_MINIMAL_LOGGING) {
    log.info("Ready to connect? " + (timeSinceLastOK && (getConnecting() == null)));
    log.info("Connecting: " + getConnecting());
    log.info("timeSinceLastOK: " + timeSinceLastOK);
  }
  return timeSinceLastOK && (getConnecting() == null);
}

private boolean readyToConnect ( ) { long now = System . currentTimeMillis ( ) ; long lastExchangeMillis = mStore . getLong ( LAST_EXCHANGE_TIME_KEY , - 1 ) ; boolean timeSinceLastOK ; if ( lastExchangeMillis == - 1 ) { timeSinceLastOK = true ; } else if ( now - lastExchangeMillis < TIME_BETWEEN_EXCHANGES_MILLIS ) { timeSinceLastOK = false ; } else { timeSinceLastOK = true ; } if ( ! USE_MINIMAL_LOGGING ) { log . info ( "Ready to connect? " + ( timeSinceLastOK && ( getConnecting ( ) == null ) ) ) ; log . info ( "Connecting: " + getConnecting ( ) ) ; log . info ( "timeSinceLastOK: " + timeSinceLastOK ) ; } return timeSinceLastOK && ( getConnecting ( ) == null ) ; }
check whether we can connect , according to our policies . currently , checks that we ' ve waited time_between_exchanges_millis milliseconds since the last exchange and that we ' re not already connecting .
