Class AbstractScheduledService.CustomScheduler.ReschedulableCallable

    • Field Detail

      • wrappedRunnable

        private final java.lang.Runnable wrappedRunnable
        The underlying task.
      • executor

        private final java.util.concurrent.ScheduledExecutorService executor
        The executor on which this Callable will be scheduled.
      • service

        private final AbstractService service
        The service that is managing this callable. This is used so that failure can be reported properly.
      • lock

        private final java.util.concurrent.locks.ReentrantLock lock
        This lock is used to ensure safe and correct cancellation, it ensures that a new task is not scheduled while a cancel is ongoing. Also it protects the currentFuture variable to ensure that it is assigned atomically with being scheduled.
    • Constructor Detail

      • ReschedulableCallable

        ReschedulableCallable​(AbstractService service,
                              java.util.concurrent.ScheduledExecutorService executor,
                              java.lang.Runnable runnable)