Package dev.failsafe.event
Class ExecutionScheduledEvent<R>
- java.lang.Object
-
- dev.failsafe.event.ExecutionEvent
-
- dev.failsafe.event.ExecutionScheduledEvent<R>
-
- Type Parameters:
R
- result type
public class ExecutionScheduledEvent<R> extends ExecutionEvent
-
-
Constructor Summary
Constructors Constructor Description ExecutionScheduledEvent(R result, java.lang.Throwable exception, java.time.Duration delay, ExecutionContext<R> context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.time.Duration
getDelay()
Returns the delay before the next execution attempt.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
-
delay
private final java.time.Duration delay
-
-
Constructor Detail
-
ExecutionScheduledEvent
public ExecutionScheduledEvent(R result, java.lang.Throwable exception, java.time.Duration delay, 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.
-
getDelay
public java.time.Duration getDelay()
Returns the delay before the next execution attempt.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-