T - return type.java.util.function.Supplier<T>public final class CommonCallableSupplier<T>
extends java.lang.Object
implements java.util.function.Supplier<T>
| Constructor | Description |
|---|---|
CommonCallableSupplier(java.util.concurrent.Callable<T> call) |
Create.
|
| Modifier and Type | Method | Description |
|---|---|---|
T |
get() |
|
static void |
maybeAwaitCompletion(java.util.concurrent.CompletableFuture<java.lang.Void> future) |
Block awaiting completion for any non-null future passed in;
No-op if a null arg was supplied.
|
static <T> java.util.concurrent.CompletableFuture<T> |
submit(java.util.concurrent.Executor executor,
java.util.concurrent.Callable<T> call) |
Submit a callable into a completable future.
|
static <T> void |
waitForCompletion(java.util.concurrent.CompletableFuture<T> future) |
Wait for a single of future to complete, extracting IOEs afterwards.
|
static <T> void |
waitForCompletion(java.util.List<java.util.concurrent.CompletableFuture<T>> futures) |
Wait for a list of futures to complete.
|
static <T> void |
waitForCompletionIgnoringExceptions(java.util.concurrent.CompletableFuture<T> future) |
Wait for a single of future to complete, ignoring exceptions raised.
|
public CommonCallableSupplier(java.util.concurrent.Callable<T> call)
call - call to invoke.public static <T> java.util.concurrent.CompletableFuture<T> submit(java.util.concurrent.Executor executor,
java.util.concurrent.Callable<T> call)
RuntimeIOException instances.T - typeexecutor - executor.call - call to invokepublic static <T> void waitForCompletion(java.util.List<java.util.concurrent.CompletableFuture<T>> futures)
throws java.io.IOException
T - Generics Type T.futures - list of futures.java.io.IOException - if one of the called futures raised an IOE.java.lang.RuntimeException - if one of the futures raised one.public static <T> void waitForCompletion(java.util.concurrent.CompletableFuture<T> future)
throws java.io.IOException
T - Generics Type T.future - future to wait for.java.io.IOException - if one of the called futures raised an IOE.java.lang.RuntimeException - if one of the futures raised one.public static <T> void waitForCompletionIgnoringExceptions(@Nullable
java.util.concurrent.CompletableFuture<T> future)
T - Generics Type T.future - future to wait for.public static void maybeAwaitCompletion(@Nullable
java.util.concurrent.CompletableFuture<java.lang.Void> future)
throws java.io.IOException
future - futurejava.io.IOException - if one of the called futures raised an IOE.java.lang.RuntimeException - if one of the futures raised one.Copyright © 2008–2025 Apache Software Foundation. All rights reserved.