Class ExecutionEvent
java.lang.Object
dev.failsafe.event.ExecutionEvent
- Direct Known Subclasses:
ExecutionAttemptedEvent, ExecutionCompletedEvent, ExecutionScheduledEvent
Encapsulates information about a Failsafe execution.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintGets the number of execution attempts so far, including attempts that are blocked before being executed, such as when aCircuitBreakeris open.Returns the elapsed time since the last execution attempt began.Returns the elapsed time since initial execution began.intGets the number of completed executions so far.Returns the time that the initial execution started, elseOptional.empty()if an execution has not started yet.booleanbooleanisRetry()
-
Field Details
-
context
-
-
Constructor Details
-
ExecutionEvent
ExecutionEvent(ExecutionContext<?> context)
-
-
Method Details
-
getElapsedTime
Returns the elapsed time since initial execution began. -
getAttemptCount
public int getAttemptCount()Gets the number of execution attempts so far, including attempts that are blocked before being executed, such as when aCircuitBreakeris open. Will return0when the first attempt is in progress or has yet to begin. -
getExecutionCount
public int getExecutionCount()Gets the number of completed executions so far. Executions that are blocked, such as when aCircuitBreakeris open, are not counted. Will return0when the first attempt is in progress or has yet to begin. -
getStartTime
Returns the time that the initial execution started, elseOptional.empty()if an execution has not started yet. -
getElapsedAttemptTime
Returns the elapsed time since the last execution attempt began. -
isFirstAttempt
public boolean isFirstAttempt() -
isRetry
public boolean isRetry()
-