类 FixedRateTask
- java.lang.Object
- org.springframework.scheduling.config.Task
- org.springframework.scheduling.config.IntervalTask
- org.springframework.scheduling.config.FixedRateTask
public class FixedRateTask extends IntervalTask
Specialization ofIntervalTask
for fixed-rate semantics.- 从以下版本开始:
- 5.0.2
- 作者:
- Juergen Hoeller
- 另请参阅:
Scheduled.fixedRate()
,ScheduledTaskRegistrar.addFixedRateTask(IntervalTask)
构造器概要
构造器 构造器 说明 FixedRateTask(Runnable runnable, long interval, long initialDelay)
Create a newFixedRateTask
.
方法概要
从类继承的方法 org.springframework.scheduling.config.IntervalTask
getInitialDelay, getInterval
从类继承的方法 org.springframework.scheduling.config.Task
getRunnable, toString
构造器详细资料
FixedRateTask
public FixedRateTask(Runnable runnable, long interval, long initialDelay)
Create a newFixedRateTask
.- 参数:
runnable
- the underlying task to executeinterval
- how often in milliseconds the task should be executedinitialDelay
- the initial delay before first execution of the task