org.springframework.scheduling.config

## 类 IntervalTask

- java.lang.Object
- - org.springframework.scheduling.config.Task
  - - org.springframework.scheduling.config.IntervalTask

- 直接已知子类:
    FixedDelayTask, FixedRateTask

      public class IntervalTask
      extends Task

  `Task` implementation defining a `Runnable` to be executed at a given millisecond interval which may be treated as fixed-rate or fixed-delay depending on context.
  从以下版本开始:
    3.2
  作者:
    Chris Beams
  另请参阅:
    `ScheduledTaskRegistrar.addFixedRateTask(IntervalTask)`, `ScheduledTaskRegistrar.addFixedDelayTask(IntervalTask)`

- - ### 构造器概要

    构造器
    构造器和说明
    `IntervalTask(Runnable runnable, long interval)` Create a new `IntervalTask` with no initial delay.
    `IntervalTask(Runnable runnable, long interval, long initialDelay)` Create a new `IntervalTask`.

  - ### 方法概要

    所有方法 实例方法 具体方法
    限定符和类型 | 方法和说明
    --- | ---
    `long` | `getInitialDelay()` Return the initial delay before first execution of the task.
    `long` | `getInterval()` Return how often in milliseconds the task should be executed.

    - ### 从类继承的方法 org.springframework.scheduling.config.Task

      `getRunnable, toString`

    - ### 从类继承的方法 java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### 构造器详细资料

    - #### IntervalTask

          public IntervalTask(Runnable runnable,
                              long interval,
                              long initialDelay)

      Create a new `IntervalTask`.
      参数:
        `runnable` - the underlying task to execute
        `interval` - how often in milliseconds the task should be executed
        `initialDelay` - the initial delay before first execution of the task

    - #### IntervalTask

          public IntervalTask(Runnable runnable,
                              long interval)

      Create a new `IntervalTask` with no initial delay.
      参数:
        `runnable` - the underlying task to execute
        `interval` - how often in milliseconds the task should be executed

  - ### 方法详细资料

    - #### getInterval

          public long getInterval()

      Return how often in milliseconds the task should be executed.

    - #### getInitialDelay

          public long getInitialDelay()

      Return the initial delay before first execution of the task.