R - result typepublic interface ExecutionInternal<R> extends ExecutionContext<R>
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancel()
Marks the execution as having been cancelled externally, which will cancel pending executions of all policies.
|
void |
cancel(PolicyExecutor<R> policyExecutor)
Marks the execution as having been cancelled by the
policyExecutor, which will also cancel pending
executions of any inner policies of the policyExecutor. |
ExecutionInternal<R> |
getLatest()
Returns the most recent execution to be attempted.
|
Object |
getLock()
Returns a lock object that is common across all execution attempts.
|
ExecutionResult<R> |
getResult()
Returns the recorded result for an execution attempt.
|
boolean |
isCancelled(PolicyExecutor<R> policyExecutor)
Returns whether the execution is considered cancelled for the
policyExecutor. |
boolean |
isPreExecuted()
Returns whether the execution has been pre-executed, indicating the attempt has started.
|
void |
preExecute()
Called when execution of the user's supplier is about to begin.
|
void |
record(ExecutionResult<R> result)
Records the
result if the execution has been pre-executed and a result has not
already been recorded. |
void |
recordAttempt()
Records an execution attempt which may correspond with an execution result.
|
getAttemptCount, getElapsedAttemptTime, getElapsedTime, getExecutionCount, getLastException, getLastResult, getLastResult, getStartTime, isCancelled, isFirstAttempt, isRetry, onCancelExecutionResult<R> getResult()
void preExecute()
boolean isPreExecuted()
void recordAttempt()
void record(ExecutionResult<R> result)
result if the execution has been pre-executed and a result has not
already been recorded.boolean cancel()
false if the execution was already cancelled or
completed.void cancel(PolicyExecutor<R> policyExecutor)
policyExecutor, which will also cancel pending
executions of any inner policies of the policyExecutor. Outer policies of the policyExecutor will
be unaffected.boolean isCancelled(PolicyExecutor<R> policyExecutor)
policyExecutor.Object getLock()
ExecutionInternal<R> getLatest()
Copyright © 2022. All rights reserved.