类 IntervalTask
java.lang.Object
cn.taketoday.scheduling.config.Task
cn.taketoday.scheduling.config.IntervalTask
- 直接已知子类:
FixedDelayTask,FixedRateTask
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.- 从以下版本开始:
- 4.0
- 作者:
- Chris Beams
- 另请参阅:
-
构造器概要
构造器构造器说明IntervalTask(Runnable runnable, long interval) Create a newIntervalTaskwith no initial delay.IntervalTask(Runnable runnable, long interval, long initialDelay) Create a newIntervalTask.IntervalTask(Runnable runnable, Duration interval) Create a newIntervalTaskwith no initial delay.IntervalTask(Runnable runnable, Duration interval, Duration initialDelay) Create a newIntervalTask. -
方法概要
修饰符和类型方法说明longReturn the initial delay before first execution of the task.Return the initial delay before first execution of the task.longReturn how often in milliseconds the task should be executed.Return how often the task should be executed.从类继承的方法 cn.taketoday.scheduling.config.Task
getRunnable, toString
-
构造器详细资料
-
IntervalTask
Create a newIntervalTask.- 参数:
runnable- the underlying task to executeinterval- how often in milliseconds the task should be executedinitialDelay- the initial delay before first execution of the task
-
IntervalTask
Create a newIntervalTaskwith no initial delay.- 参数:
runnable- the underlying task to executeinterval- how often in milliseconds the task should be executed
-
IntervalTask
Create a newIntervalTaskwith no initial delay.- 参数:
runnable- the underlying task to executeinterval- how often the task should be executed
-
IntervalTask
Create a newIntervalTask.- 参数:
runnable- the underlying task to executeinterval- how often the task should be executedinitialDelay- the initial delay before first execution of the task
-
-
方法详细资料
-
getInterval
public long getInterval()Return how often in milliseconds the task should be executed. -
getIntervalDuration
Return how often the task should be executed. -
getInitialDelay
public long getInitialDelay()Return the initial delay before first execution of the task. -
getInitialDelayDuration
Return the initial delay before first execution of the task.
-