Top Description Fields Constructors Methods
org.springframework.scheduling.config

public Class DelayedTask

extends Task
Class Inheritance
Known Direct Subclasses
org.springframework.scheduling.config.IntervalTask, org.springframework.scheduling.config.OneTimeTask
Imports
java.time.Duration, org.springframework.util.Assert

Task implementation defining a Runnable with an initial delay.
Author
Juergen Hoeller
Since
6.1

Field Summary

Modifier and TypeField and Description
private final Duration

Constructor Summary

AccessConstructor and Description
public
DelayedTask(Runnable
the underlying task to execute
runnable
,
Duration
the initial delay before execution of the task
initialDelay
)

Create a new DelayedTask.

pack-priv
DelayedTask(DelayedTask task)

Copy constructor.

Method Summary

Modifier and TypeMethod and Description
public Duration
getInitialDelayDuration()

Return the initial delay before first execution of the task.

Inherited from org.springframework.scheduling.config.Task:
getRunnabletoString

Field Detail

initialDelayback to summary
private final Duration initialDelay

Constructor Detail

DelayedTaskback to summary
public DelayedTask(Runnable runnable, Duration initialDelay)

Create a new DelayedTask.

Parameters
runnable:Runnable

the underlying task to execute

initialDelay:Duration

the initial delay before execution of the task

DelayedTaskback to summary
pack-priv DelayedTask(DelayedTask task)

Copy constructor.

Method Detail

getInitialDelayDurationback to summary
public Duration getInitialDelayDuration()

Return the initial delay before first execution of the task.