public final class FutureUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static <V> V |
get(Future<V> delegate)
Delegates the get operation to the provided Future.
|
static <V> V |
get(Future<V> delegate,
long timeout,
TimeUnit unit)
Delegates the get operation with timeout to the provided Future.
|
static boolean |
isCancelled(Future<?> delegate)
Delegates the isCancelled operation to the provided Future.
|
static boolean |
isDone(Future<?> delegate)
Delegates the isDone operation to the provided Future.
|
public static boolean isDone(Future<?> delegate)
delegate - the Future to delegate topublic static boolean isCancelled(Future<?> delegate)
delegate - the Future to delegate topublic static <V> V get(Future<V> delegate) throws InterruptedException, ExecutionException
delegate - the Future to delegate toInterruptedException - if the delegate throws InterruptedExceptionExecutionException - if the delegate throws ExecutionExceptionpublic static <V> V get(Future<V> delegate, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
delegate - the Future to delegate totimeout - the maximum time to waitunit - the time unit of the timeout argumentInterruptedException - if the delegate throws InterruptedExceptionExecutionException - if the delegate throws ExecutionExceptionTimeoutException - if the delegate throws TimeoutExceptionCopyright © 2003–2025 MuleSoft, Inc.. All rights reserved.