/** * <p> * hasInflightRequests. * </p> * @return a boolean. */ public boolean hasInflightRequests() { return operationsAccountant.hasInflightOperations(); }
/** * Blocks until all outstanding RPCs and retries have completed * * @throws java.lang.InterruptedException if any. */ 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"); } }