public final class Futures extends Object
Modifier and Type | Method and Description |
---|---|
static RuntimeException |
cancelAll(boolean mayInterrupt,
Future[] futures,
int from) |
static RuntimeException |
cancelAll(boolean mayInterrupt,
Future<?>... futures) |
static RuntimeException |
cancelAll(boolean mayInterrupt,
Iterator<Future<?>> iterator) |
static Pair<Map<Future,Object>,Exception> |
getAll(long timeoutMillis,
Future... futures) |
static Pair<Map<Future,Object>,Exception> |
getAll(long timeoutMillis,
Iterable<Future> futures) |
static <T> Exception |
getAllWithDeadlineNanos(long deadlineNanos,
BiConsumer<Future<T>,T> consumer,
Future<T>... futures) |
static <T> Exception |
getAllWithDeadlineNanos(long deadlineNanos,
BiConsumer<Future<T>,T> consumer,
Iterable<Future<T>> futures) |
static Pair<Map<Future,Object>,Exception> |
getAllWithDeadlineNanos(long deadlineNanos,
Future... futures) |
static Pair<Map<Future,Object>,Exception> |
getAllWithDeadlineNanos(long deadlineNanos,
Iterable<Future> futures) |
static Exception |
getAllWithDeadlineNanosRetVoid(long deadlineNanos,
Future... futures)
Gets all futures resuls for futures that return Void (no return).
|
static <T> List<Future<T>> |
timedOutFutures(int copies,
TimeoutException ex) |
@Nullable @CheckReturnValue public static RuntimeException cancelAll(boolean mayInterrupt, Future<?>... futures)
@Nullable @CheckReturnValue public static RuntimeException cancelAll(boolean mayInterrupt, Future[] futures, int from)
@Nullable public static RuntimeException cancelAll(boolean mayInterrupt, Iterator<Future<?>> iterator)
@CheckReturnValue @Nonnull public static Pair<Map<Future,Object>,Exception> getAll(long timeoutMillis, Future... futures)
@CheckReturnValue @Nonnull public static Pair<Map<Future,Object>,Exception> getAllWithDeadlineNanos(long deadlineNanos, Future... futures)
@CheckReturnValue @Nullable public static <T> Exception getAllWithDeadlineNanos(long deadlineNanos, BiConsumer<Future<T>,T> consumer, Future<T>... futures)
deadlineNanos
- futures
- @CheckReturnValue @Nullable public static Exception getAllWithDeadlineNanosRetVoid(long deadlineNanos, Future... futures)
deadlineNanos
- futures
- @CheckReturnValue @Nonnull public static Pair<Map<Future,Object>,Exception> getAll(long timeoutMillis, Iterable<Future> futures)
@CheckReturnValue @Nonnull public static Pair<Map<Future,Object>,Exception> getAllWithDeadlineNanos(long deadlineNanos, Iterable<Future> futures)
@CheckReturnValue @Nullable public static <T> Exception getAllWithDeadlineNanos(long deadlineNanos, BiConsumer<Future<T>,T> consumer, Iterable<Future<T>> futures)
public static <T> List<Future<T>> timedOutFutures(int copies, TimeoutException ex)
Copyright © 2021 SPF4J. All rights reserved.