@Override public void operationComplete(F future) throws Exception { InternalLogger internalLogger = logNotifyFailure ? logger : null; if (future.isSuccess()) { V result = future.get(); for (Promise<? super V> p: promises) { PromiseNotificationUtil.trySuccess(p, result, internalLogger); } } else if (future.isCancelled()) { for (Promise<? super V> p: promises) { PromiseNotificationUtil.tryCancel(p, internalLogger); } } else { Throwable cause = future.cause(); for (Promise<? super V> p: promises) { PromiseNotificationUtil.tryFailure(p, cause, internalLogger); } } } }