question: 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 ) ; }
target:  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.