public final class CompletionActions
extends Object
Provides the common actions that are useful when handling a
CompletionStage
.
-
Method Summary
Modifier and Type |
Method |
Description |
static <T> T |
log(Throwable cause) |
|
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Method Details
-
@Nullable
public static <T> T log(
Throwable cause)
Logs the specified
Throwable
. For example:
CompletableFuture<?> f = ...;
f.exceptionally(CompletionActions::log);
- Returns:
null