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
Indicates an execution was scheduled. A scheduled execution will be executed after the delay unless it is cancelled, either explicitly or via Future.cancel(boolean), a Timeout, or if the underlying Scheduler or ExecutorService is shutdown.
  • Field Details

    • result

      private final R result
    • exception

      private final Throwable exception
    • delay

      private final Duration delay
  • Constructor Details

  • Method Details

    • getLastException

      public Throwable getLastException()
      Returns the failure that preceded the event, else null if there was none.
    • getLastResult

      public R getLastResult()
      Returns the result that preceded the event, else null if there was none.
    • getDelay

      public Duration getDelay()
      Returns the delay before the next execution attempt.
    • toString

      public String toString()
      Overrides:
      toString in class Object