Class 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.- Since:
- 5.0.2
- Author:
- Juergen Hoeller
- See Also:
Scheduled.fixedRate()
,ScheduledTaskRegistrar.addFixedRateTask(IntervalTask)
Constructor Summary
Constructors Constructor Description FixedRateTask(Runnable runnable, long interval, long initialDelay)
Create a newFixedRateTask
.
Method Summary
Methods inherited from class org.springframework.scheduling.config.IntervalTask
getInitialDelay, getInterval
Methods inherited from class org.springframework.scheduling.config.Task
getRunnable, toString
Constructor Detail
FixedRateTask
public FixedRateTask(Runnable runnable, long interval, long initialDelay)
Create a newFixedRateTask
.- Parameters:
runnable
- the underlying task to executeinterval
- how often in milliseconds the task should be executedinitialDelay
- the initial delay before first execution of the task