Class ScheduledFutureTask<V>

    • Field Detail

      • START_TIME

        private static final long START_TIME
      • id

        private long id
      • deadlineNanos

        private long deadlineNanos
      • periodNanos

        private final long periodNanos
      • queueIndex

        private int queueIndex
    • Method Detail

      • nanoTime

        static long nanoTime()
      • deadlineNanos

        static long deadlineNanos​(long delay)
      • initialNanoTime

        static long initialNanoTime()
      • validatePeriod

        private static long validatePeriod​(long period)
      • executor

        protected EventExecutor executor()
        Description copied from class: DefaultPromise
        Get the executor used to notify listeners when this promise is complete.

        It is assumed this executor will protect against StackOverflowError exceptions. The executor may be used to avoid StackOverflowError by executing a Runnable if the stack depth exceeds a threshold.

        Overrides:
        executor in class DefaultPromise<V>
        Returns:
        The executor used to notify listeners when this promise is complete.
      • deadlineNanos

        public long deadlineNanos()
      • setConsumed

        void setConsumed()
      • delayNanos

        public long delayNanos()
      • deadlineToDelayNanos

        static long deadlineToDelayNanos​(long deadlineNanos)
      • delayNanos

        public long delayNanos​(long currentTimeNanos)
      • getDelay

        public long getDelay​(java.util.concurrent.TimeUnit unit)
        Specified by:
        getDelay in interface java.util.concurrent.Delayed
      • compareTo

        public int compareTo​(java.util.concurrent.Delayed o)
        Specified by:
        compareTo in interface java.lang.Comparable<V>
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable
        Specified by:
        run in interface java.util.concurrent.RunnableFuture<V>
        Overrides:
        run in class PromiseTask<V>
      • cancel

        public boolean cancel​(boolean mayInterruptIfRunning)
        If the cancellation was successful it will fail the future with a CancellationException.
        Specified by:
        cancel in interface Future<V>
        Specified by:
        cancel in interface java.util.concurrent.Future<V>
        Overrides:
        cancel in class PromiseTask<V>
        Parameters:
        mayInterruptIfRunning - this value has no effect in this implementation.
      • cancelWithoutRemove

        boolean cancelWithoutRemove​(boolean mayInterruptIfRunning)