/** * Blockingly waits indefinitely for the given Future to terminate, * relaying any error the Future signals. * @param future the future to await * @return the new Nono instance */ public static Nono fromFuture(Future<?> future) { ObjectHelper.requireNonNull(future, "future is null"); return onAssembly(new NonoFromFuture(future, 0L, TimeUnit.NANOSECONDS)); }
/** * Blockingly waits indefinitely for the given Future to terminate, * relaying any error the Future signals. * @param future the future to await * @return the new Nono instance */ public static Nono fromFuture(Future<?> future) { ObjectHelper.requireNonNull(future, "future is null"); return onAssembly(new NonoFromFuture(future, 0L, TimeUnit.NANOSECONDS)); }
/** * Blockingly waits the given Future for the given timeout to terminate, * relaying any error the Future signals. * @param future the future to await * @param timeout the timeout value to wait for termination * @param unit the unit for the timeout parameter * @return the new Nono instance */ public static Nono fromFuture(Future<?> future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); ObjectHelper.requireNonNull(unit, "unit is null"); return onAssembly(new NonoFromFuture(future, timeout, unit)); }
/** * Blockingly waits the given Future for the given timeout to terminate, * relaying any error the Future signals. * @param future the future to await * @param timeout the timeout value to wait for termination * @param unit the unit for the timeout parameter * @return the new Nono instance */ public static Nono fromFuture(Future<?> future, long timeout, TimeUnit unit) { ObjectHelper.requireNonNull(future, "future is null"); ObjectHelper.requireNonNull(unit, "unit is null"); return onAssembly(new NonoFromFuture(future, timeout, unit)); }