question: public void waitForCurrentOperations ( long timeout ) { long startTime = System . currentTimeMillis ( ) ; long warnTime = startTime + timeout ; long quitTime = warnTime + timeout - 1000L ; boolean warned = false ; final boolean isDebugEnabled_STATE_FLUSH_OP = logger . isTraceEnabled ( LogMarker . STATE_FLUSH_OP ) ; while ( true ) { long opCount ; synchronized ( this . opCountLock ) { opCount = this . previousVersionOpCount ; } if ( opCount <= 0 ) { break ; } if ( isDebugEnabled_STATE_FLUSH_OP ) { logger . trace ( LogMarker . STATE_FLUSH_OP , "Waiting for current operations to finish({})" , opCount ) ; } try { Thread . sleep ( 50 ) ; } catch ( InterruptedException e ) { throw new GemFireIOException ( "State flush interrupted" ) ; } long now = System . currentTimeMillis ( ) ; if ( ( ! warned ) && System . currentTimeMillis ( ) >= warnTime ) { warned = true ; logger . warn ( LocalizedMessage . create ( LocalizedStrings . DistributionAdvisor_0_SEC_HAVE_ELAPSED_WHILE_WAITING_FOR_CURRENT_OPERATIONS_TO_DISTRIBUTE , Long . toString ( ( warnTime - startTime ) / 1000L ) ) ) ; } else if ( warned && ( now >= quitTime ) ) { throw new GemFireIOException ( "Current operations did not distribute within " + ( now - startTime ) + " milliseconds" ) ; } } if ( this . membershipClosed ) { if ( isDebugEnabled_STATE_FLUSH_OP ) { logger . trace ( LogMarker . STATE_FLUSH_OP , "State Flush stopped waiting for operations to distribute because advisor has been closed" ) ; } } }
target:  wait for the current operations being sent on views prior to the joining of the given member to be placed on communication channels before returning