Class SchedulerService

  • All Implemented Interfaces:
    Scheduler, java.lang.AutoCloseable

    public class SchedulerService
    extends java.lang.Object
    implements Scheduler, java.lang.AutoCloseable
    • Constructor Summary

      Constructors 
      Constructor Description
      SchedulerService​(int numberOfThreads)  
    • Method Summary

      Modifier and Type Method Description
      void close()  
      void execute​(java.lang.Runnable command)  
      java.util.concurrent.ScheduledFuture<?> schedule​(java.lang.Runnable command, long delay, java.util.concurrent.TimeUnit unit)  
      java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate​(java.lang.Runnable command, long initialDelay, long period, java.util.concurrent.TimeUnit unit)  
      • Methods inherited from class java.lang.Object

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

      • SchedulerService

        public SchedulerService​(int numberOfThreads)
    • Method Detail

      • scheduleAtFixedRate

        public java.util.concurrent.ScheduledFuture<?> scheduleAtFixedRate​(java.lang.Runnable command,
                                                                           long initialDelay,
                                                                           long period,
                                                                           java.util.concurrent.TimeUnit unit)
        Specified by:
        scheduleAtFixedRate in interface Scheduler
      • schedule

        public java.util.concurrent.ScheduledFuture<?> schedule​(java.lang.Runnable command,
                                                                long delay,
                                                                java.util.concurrent.TimeUnit unit)
        Specified by:
        schedule in interface Scheduler
      • execute

        public void execute​(java.lang.Runnable command)
        Specified by:
        execute in interface Scheduler
      • close

        public void close()
        Specified by:
        close in interface java.lang.AutoCloseable