Package dev.failsafe.event
Class ExecutionAttemptedEvent<R>
- java.lang.Object
-
- dev.failsafe.event.ExecutionEvent
-
- dev.failsafe.event.ExecutionAttemptedEvent<R>
-
- Type Parameters:
R
- result type
public class ExecutionAttemptedEvent<R> extends ExecutionEvent
Indicates an execution was attempted.
-
-
Constructor Summary
Constructors Constructor Description ExecutionAttemptedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Throwable
getLastException()
Returns the failure that preceded the event, elsenull
if there was none.R
getLastResult()
Returns the result that preceded the event, elsenull
if there was none.java.lang.String
toString()
-
Methods inherited from class dev.failsafe.event.ExecutionEvent
getAttemptCount, getElapsedAttemptTime, getElapsedTime, getExecutionCount, getStartTime, isFirstAttempt, isRetry
-
-
-
-
Field Detail
-
result
private final R result
-
exception
private final java.lang.Throwable exception
-
-
Constructor Detail
-
ExecutionAttemptedEvent
public ExecutionAttemptedEvent(R result, java.lang.Throwable exception, ExecutionContext<R> context)
-
-
Method Detail
-
getLastException
public java.lang.Throwable getLastException()
Returns the failure that preceded the event, elsenull
if there was none.
-
getLastResult
public R getLastResult()
Returns the result that preceded the event, elsenull
if there was none.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-