/** * Wait on all the {@link IoFuture}s we get, or until one of the {@link IoFuture}s is interrupted * * @param futures The {@link IoFuture}s we are waiting on * @param timeoutMillis The maximum milliseconds we wait for the {@link IoFuture}s to complete * @return <tt>TRUE</TT> if all the {@link IoFuture} have been completed, <tt>FALSE</tt> if * at least one {@link IoFuture} has been interrupted * @throws InterruptedException If one of the {@link IoFuture} is interrupted */ public static boolean await(Iterable<? extends IoFuture> futures, long timeoutMillis) throws InterruptedException { return await0(futures, timeoutMillis, true); }
/** * Wait on all the {@link IoFuture}s we get, or until one of the {@link IoFuture}s is interrupted * * @param futures The {@link IoFuture}s we are waiting on * @param timeoutMillis The maximum milliseconds we wait for the {@link IoFuture}s to complete * @return <tt>TRUE</TT> if all the {@link IoFuture} have been completed, <tt>FALSE</tt> if * at least one {@link IoFuture} has been interrupted * @throws InterruptedException If one of the {@link IoFuture} is interrupted */ public static boolean await(Iterable<? extends IoFuture> futures, long timeoutMillis) throws InterruptedException { return await0(futures, timeoutMillis, true); }
public static boolean await(Iterable<? extends IoFuture> futures, long timeoutMillis) throws InterruptedException { return await0(futures, timeoutMillis, true); }
public static boolean awaitUninterruptibly(Iterable<? extends IoFuture> futures, long timeoutMillis) { try { return await0(futures, timeoutMillis, false); } catch (InterruptedException e) { throw new InternalError(); } }
/** * Wait on all the {@link IoFuture}s we get. * * @param futures The {@link IoFuture}s we are waiting on * @param timeoutMillis The maximum milliseconds we wait for the {@link IoFuture}s to complete * @return <tt>TRUE</TT> if all the {@link IoFuture} have been completed, <tt>FALSE</tt> if * at least one {@link IoFuture} has been interrupted */ public static boolean awaitUninterruptibly(Iterable<? extends IoFuture> futures, long timeoutMillis) { try { return await0(futures, timeoutMillis, false); } catch (InterruptedException e) { throw new InternalError(); } }
/** * Wait on all the {@link IoFuture}s we get. * * @param futures The {@link IoFuture}s we are waiting on * @param timeoutMillis The maximum milliseconds we wait for the {@link IoFuture}s to complete * @return <tt>TRUE</TT> if all the {@link IoFuture} have been completed, <tt>FALSE</tt> if * at least one {@link IoFuture} has been interrupted */ public static boolean awaitUninterruptibly(Iterable<? extends IoFuture> futures, long timeoutMillis) { try { return await0(futures, timeoutMillis, false); } catch (InterruptedException e) { throw new InternalError(); } }