public class ExecutionContext extends Object
| Modifier and Type | Method and Description |
|---|---|
ExecutionContext |
copy() |
int |
getAttemptCount()
Gets the number of completed execution attempts so far.
|
Duration |
getElapsedAttemptTime()
Returns the elapsed time since the last execution attempt began.
|
Duration |
getElapsedTime()
Returns the elapsed time since initial execution began.
|
<T extends Throwable> |
getLastFailure()
Returns the last failure that was recorded else
null. |
<T> T |
getLastResult()
Returns the last result that was recorded else
null. |
<T> T |
getLastResult(T defaultValue)
Returns the last result that was recorded else the
defaultValue. |
Duration |
getStartTime()
Returns the time that the initial execution started.
|
boolean |
isCancelled()
Returns whether the execution has ben cancelled.
|
String |
toString() |
public Duration getElapsedTime()
public Duration getElapsedAttemptTime()
public int getAttemptCount()
public <T extends Throwable> T getLastFailure()
null.public <T> T getLastResult()
null.public <T> T getLastResult(T defaultValue)
defaultValue.public Duration getStartTime()
public boolean isCancelled()
public ExecutionContext copy()
Copyright © 2019. All rights reserved.