public static final class ClusterStateTaskExecutor.TaskResult
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static ClusterStateTaskExecutor.TaskResult |
failure(java.lang.Throwable failure) |
java.lang.Throwable |
getFailure() |
void |
handle(java.lang.Runnable onSuccess,
java.util.function.Consumer<java.lang.Throwable> onFailure)
Handle the execution result with the provided consumers
|
boolean |
isSuccess() |
static ClusterStateTaskExecutor.TaskResult |
success() |
public static ClusterStateTaskExecutor.TaskResult success()
public static ClusterStateTaskExecutor.TaskResult failure(java.lang.Throwable failure)
public boolean isSuccess()
public java.lang.Throwable getFailure()
public void handle(java.lang.Runnable onSuccess, java.util.function.Consumer<java.lang.Throwable> onFailure)
onSuccess
- handler to invoke on successonFailure
- handler to invoke on failure; the throwable passed through will not be null