@Override public synchronized void accept(R newValue, Throwable exception) { if (remainingResponses <= 0) return; if (exception != null) { remainingResponses = 0; future.completeExceptionally(exception); } else { remainingResponses--; maybeComplete(); } }