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.ThrowablegetLastException()Returns the failure that preceded the event, elsenullif there was none.RgetLastResult()Returns the result that preceded the event, elsenullif there was none.java.lang.StringtoString()-
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, elsenullif there was none.
-
getLastResult
public R getLastResult()
Returns the result that preceded the event, elsenullif there was none.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-