Class GuardedScheduler

  • All Implemented Interfaces:
    Scheduler, java.io.Serializable

    final class GuardedScheduler
    extends java.lang.Object
    implements Scheduler, java.io.Serializable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) Scheduler delegate  
      (package private) static java.util.logging.Logger logger  
      (package private) static long serialVersionUID  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      @NonNull java.util.concurrent.Future<?> schedule​(@NonNull java.util.concurrent.Executor executor, @NonNull java.lang.Runnable command, long delay, @NonNull java.util.concurrent.TimeUnit unit)
      Returns a future that will submit the task to the given executor after the given delay.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • logger

        static final java.util.logging.Logger logger
    • Constructor Detail

      • GuardedScheduler

        GuardedScheduler​(Scheduler delegate)
    • Method Detail

      • schedule

        public @NonNull java.util.concurrent.Future<?> schedule​(@NonNull java.util.concurrent.Executor executor,
                                                                @NonNull java.lang.Runnable command,
                                                                long delay,
                                                                @NonNull java.util.concurrent.TimeUnit unit)
        Description copied from interface: Scheduler
        Returns a future that will submit the task to the given executor after the given delay.
        Specified by:
        schedule in interface Scheduler
        Parameters:
        executor - the executor to run the task
        command - the runnable task to schedule
        delay - how long to delay, in units of unit
        unit - a TimeUnit determining how to interpret the delay parameter
        Returns:
        a scheduled future representing pending submission of the task