private void waitForCompletions(long timeoutMs) throws InterruptedException {
    Long completedOperation =
        this.completedOperationIds.pollFirst(timeoutMs, TimeUnit.MILLISECONDS);
    if (completedOperation != null) {
      markOperationComplete(completedOperation);
    }
  }
private void waitForCompletions ( long timeoutMs ) throws InterruptedException { Long completedOperation = this . completedOperationIds . pollFirst ( timeoutMs , TimeUnit . MILLISECONDS ) ; if ( completedOperation != null ) { markOperationComplete ( completedOperation ) ; } }
Waits for a completion and then marks it as complete.
@throws InterruptedException