类 IntervalTask
- java.lang.Object
- org.springframework.scheduling.config.Task
- org.springframework.scheduling.config.IntervalTask
public class IntervalTask extends Task
Taskimplementation defining aRunnableto be executed at a given millisecond interval which may be treated as fixed-rate or fixed-delay depending on context.
构造器概要
构造器 构造器 说明 IntervalTask(Runnable runnable, long interval)Create a newIntervalTaskwith no initial delay.IntervalTask(Runnable runnable, long interval, long initialDelay)Create a newIntervalTask.
构造器详细资料
IntervalTask
public IntervalTask(Runnable runnable, long interval, long initialDelay)
Create a newIntervalTask.- 参数:
runnable- the underlying task to executeinterval- how often in milliseconds the task should be executedinitialDelay- initial delay before first execution of the task
IntervalTask
public IntervalTask(Runnable runnable, long interval)
Create a newIntervalTaskwith no initial delay.- 参数:
runnable- the underlying task to executeinterval- how often in milliseconds the task should be executed
方法详细资料
getInterval
public long getInterval()
getInitialDelay
public long getInitialDelay()