Class TimerManagerTaskScheduler

    • Method Detail

      • schedule

        public ScheduledFuture<?> schedule​(Runnable task,
                                           Date startTime)
        Description copied from interface: TaskScheduler
        Schedule the given Runnable, invoking it at the specified execution time.

        Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

        Specified by:
        schedule in interface TaskScheduler
        Parameters:
        task - the Runnable to execute whenever the trigger fires
        startTime - the desired execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
        Returns:
        a ScheduledFuture representing pending completion of the task
      • scheduleAtFixedRate

        public ScheduledFuture<?> scheduleAtFixedRate​(Runnable task,
                                                      Date startTime,
                                                      long period)
        Description copied from interface: TaskScheduler
        Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given period.

        Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

        Specified by:
        scheduleAtFixedRate in interface TaskScheduler
        Parameters:
        task - the Runnable to execute whenever the trigger fires
        startTime - the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
        period - the interval between successive executions of the task (in milliseconds)
        Returns:
        a ScheduledFuture representing pending completion of the task
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(Runnable task,
                                                         Date startTime,
                                                         long delay)
        Description copied from interface: TaskScheduler
        Schedule the given Runnable, invoking it at the specified execution time and subsequently with the given delay between the completion of one execution and the start of the next.

        Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

        Specified by:
        scheduleWithFixedDelay in interface TaskScheduler
        Parameters:
        task - the Runnable to execute whenever the trigger fires
        startTime - the desired first execution time for the task (if this is in the past, the task will be executed immediately, i.e. as soon as possible)
        delay - the delay between the completion of one execution and the start of the next (in milliseconds)
        Returns:
        a ScheduledFuture representing pending completion of the task
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(Runnable task,
                                                         long delay)
        Description copied from interface: TaskScheduler
        Schedule the given Runnable, starting as soon as possible and invoking it with the given delay between the completion of one execution and the start of the next.

        Execution will end once the scheduler shuts down or the returned ScheduledFuture gets cancelled.

        Specified by:
        scheduleWithFixedDelay in interface TaskScheduler
        Parameters:
        task - the Runnable to execute whenever the trigger fires
        delay - the interval between successive executions of the task (in milliseconds)
        Returns:
        a ScheduledFuture representing pending completion of the task