public final class FutureUtils
extends java.lang.Object
Future
.Modifier and Type | Method and Description |
---|---|
static <T> T |
awaitResult(java.util.concurrent.Future<T> future)
Await the completion of the passed
Future and return its result. |
static void |
awaitTermination(java.util.concurrent.Future<java.lang.Void> future)
Await the completion of the passed
Future . |
public static void awaitTermination(java.util.concurrent.Future<java.lang.Void> future)
Future
.future
- Future
to await termination.public static <T> T awaitResult(java.util.concurrent.Future<T> future)
Future
and return its result.T
- the result type.future
- Future
to await completion.Future
.