public class ExecutionResult extends Object
Part of the Failsafe SPI.
| Constructor and Description |
|---|
ExecutionResult(Object result,
Throwable failure)
Records an initial execution result with
complete true and success set to true if failure
is not null. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static ExecutionResult |
failure(Throwable failure)
Returns a an ExecutionResult with the
failure set, complete true and success false. |
Throwable |
getFailure() |
Object |
getResult() |
long |
getWaitNanos() |
int |
hashCode() |
boolean |
isComplete() |
boolean |
isNonResult() |
boolean |
isSuccess() |
static ExecutionResult |
success(Object result)
Returns a an ExecutionResult with the
result set, complete true and success true. |
String |
toString() |
ExecutionResult |
with(long waitNanos,
boolean complete,
boolean success)
Returns a copy of the ExecutionResult with the
waitNanos, complete and success values. |
ExecutionResult |
withResult(Object result)
Returns a copy of the ExecutionResult with the
result value, and complete and success set to true. |
ExecutionResult |
withWaitNanos(long waitNanos)
Returns a copy of the ExecutionResult with the
waitNanos value. |
public static ExecutionResult success(Object result)
result set, complete true and success true.public static ExecutionResult failure(Throwable failure)
failure set, complete true and success false.public Object getResult()
public Throwable getFailure()
public long getWaitNanos()
public boolean isComplete()
public boolean isNonResult()
public boolean isSuccess()
public ExecutionResult withResult(Object result)
public ExecutionResult withWaitNanos(long waitNanos)
waitNanos value.public ExecutionResult with(long waitNanos, boolean complete, boolean success)
waitNanos, complete and success values.Copyright © 2020. All rights reserved.