public void awaitCompletion ( ) throws InterruptedException { boolean performedWarning = false ; while ( hasInflightOperations ( ) ) { synchronized ( signal ) { if ( hasInflightOperations ( ) ) { signal . wait ( finishWaitMillis ) ; } } long now = clock . nanoTime ( ) ; if ( now >= noSuccessCheckDeadlineNanos ) { logNoSuccessWarning ( now ) ; resetNoSuccessWarningDeadline ( ) ; performedWarning = true ; } } if ( performedWarning ) { LOG . info ( "awaitCompletion() completed" ) ; } }
Blocks until all outstanding RPCs and retries have completed