类 TimerManagerTaskScheduler

    • 方法详细资料

      • schedule

        public ScheduledFuture<?> schedule​(Runnable task,
                                           Date startTime)
        从接口复制的说明: 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.

        指定者:
        schedule 在接口中 TaskScheduler
        参数:
        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)
        返回:
        a ScheduledFuture representing pending completion of the task
      • scheduleAtFixedRate

        public ScheduledFuture<?> scheduleAtFixedRate​(Runnable task,
                                                      Date startTime,
                                                      long period)
        从接口复制的说明: 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.

        指定者:
        scheduleAtFixedRate 在接口中 TaskScheduler
        参数:
        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)
        返回:
        a ScheduledFuture representing pending completion of the task
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(Runnable task,
                                                         Date startTime,
                                                         long delay)
        从接口复制的说明: 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.

        指定者:
        scheduleWithFixedDelay 在接口中 TaskScheduler
        参数:
        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)
        返回:
        a ScheduledFuture representing pending completion of the task
      • scheduleWithFixedDelay

        public ScheduledFuture<?> scheduleWithFixedDelay​(Runnable task,
                                                         long delay)
        从接口复制的说明: 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.

        指定者:
        scheduleWithFixedDelay 在接口中 TaskScheduler
        参数:
        task - the Runnable to execute whenever the trigger fires
        delay - the interval between successive executions of the task (in milliseconds)
        返回:
        a ScheduledFuture representing pending completion of the task