Class 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 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, 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 java.time.Duration getDelay()
        Returns the delay before the next execution attempt.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object