R
- result typepublic interface AsyncExecution<R> extends ExecutionContext<R>
Modifier and Type | Method and Description |
---|---|
void |
complete()
Completes the execution and the associated
CompletableFuture . |
boolean |
isComplete()
Returns whether the execution is complete or if it can be retried.
|
void |
record(R result,
Throwable exception)
Records an execution
result or exception which triggers failure handling, if needed, by the
configured policies. |
void |
recordException(Throwable exception)
Records an
exception which triggers failure handling, if needed, by the configured policies. |
void |
recordResult(R result)
Records an execution
result which triggers failure handling, if needed, by the configured policies. |
getAttemptCount, getElapsedAttemptTime, getElapsedTime, getExecutionCount, getLastException, getLastResult, getLastResult, getStartTime, isCancelled, isFirstAttempt, isRetry, onCancel
void complete()
CompletableFuture
.IllegalStateException
- if the execution is already recorded or completeboolean isComplete()
void record(R result, Throwable exception)
result
or exception
which triggers failure handling, if needed, by the
configured policies. If policy handling is not possible or already complete, the resulting CompletableFuture
is completed.IllegalStateException
- if the most recent execution was already recorded or the execution is completevoid recordResult(R result)
result
which triggers failure handling, if needed, by the configured policies. If
policy handling is not possible or already complete, the resulting CompletableFuture
is completed.IllegalStateException
- if the most recent execution was already recorded or the execution is completevoid recordException(Throwable exception)
exception
which triggers failure handling, if needed, by the configured policies. If policy
handling is not possible or already complete, the resulting CompletableFuture
is completed.IllegalStateException
- if the most recent execution was already recorded or the execution is completeCopyright © 2022. All rights reserved.