Class AbstractScheduledService.Scheduler

    • Method Detail

      • newFixedDelaySchedule

        public static AbstractScheduledService.Scheduler newFixedDelaySchedule​(long initialDelay,
                                                                               long delay,
                                                                               java.util.concurrent.TimeUnit unit)
        Returns a AbstractScheduledService.Scheduler that schedules the task using the ScheduledExecutorService.scheduleWithFixedDelay(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit) method.
        Parameters:
        initialDelay - the time to delay first execution
        delay - the delay between the termination of one execution and the commencement of the next
        unit - the time unit of the initialDelay and delay parameters
      • newFixedRateSchedule

        public static AbstractScheduledService.Scheduler newFixedRateSchedule​(long initialDelay,
                                                                              long period,
                                                                              java.util.concurrent.TimeUnit unit)
        Returns a AbstractScheduledService.Scheduler that schedules the task using the ScheduledExecutorService.scheduleAtFixedRate(java.lang.Runnable, long, long, java.util.concurrent.TimeUnit) method.
        Parameters:
        initialDelay - the time to delay first execution
        period - the period between successive executions of the task
        unit - the time unit of the initialDelay and period parameters