@Override public final ChannelGroupFuture await() throws InterruptedException { if (Thread.interrupted()) { throw new InterruptedException(); } waitForConditionSet(-1, -1); if (condition) { backedChannelGroupFuture.await(); } return this; }
@Override public final boolean await(final long timeout, final TimeUnit unit) throws InterruptedException { final long nano = unit.toNanos(timeout); final long milli = NANOSECONDS.toMillis(nano); final int nanoRemain = (int) (nano - MILLISECONDS.toNanos(milli)); final long remain = nano - waitForConditionSet(milli, nanoRemain); if (conditionSetFlag) { if (condition) { return backedChannelGroupFuture.await(remain, NANOSECONDS); } else { return true; } } else { return false; } }