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.
ScheduledTaskRegistrar#addFixedRateTask(IntervalTask), ScheduledTaskRegistrar#addFixedDelayTask(IntervalTask)
| Access | Constructor and Description |
|---|---|
| public | IntervalTask(Runnable
the underlying task to execute runnable, long how often in milliseconds the task should be executed interval, long the initial delay before first execution of the task initialDelay)
Deprecated
since 6.0. as of 6.0, in favor on
IntervalTask(Runnable, Duration, Duration)
Create a new |
| public | IntervalTask(Runnable
the underlying task to execute runnable, long how often in milliseconds the task should be executed interval)
Deprecated
since 6.0. as of 6.0, in favor on
IntervalTask(Runnable, Duration)
Create a new |
| public | IntervalTask(Runnable
the underlying task to execute runnable, Duration how often the task should be executed interval)Create a new |
| public | IntervalTask(Runnable
the underlying task to execute runnable, Duration how often the task should be executed interval, Duration the initial delay before first execution of the task initialDelay)Create a new |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public long | getInitialDelay()
Deprecated
since 6.0. as of 6.0, in favor of
getInitialDelayDuration()
Return the initial delay before first execution of the task. |
| public Duration | getInitialDelayDuration()
Overrides org. Return the initial delay before first execution of the task. |
| public long | getInterval()
Deprecated
since 6.0. as of 6.0, in favor of
getIntervalDuration()
Return how often in milliseconds the task should be executed. |
| public Duration |
| interval | back to summary |
|---|---|
| private final Duration interval | |
| IntervalTask | back to summary |
|---|---|
| public IntervalTask(Runnable runnable, long interval, long initialDelay)
Create a new
| |
| IntervalTask | back to summary |
|---|---|
| public IntervalTask(Runnable runnable, long interval)
Create a new
| |
| IntervalTask | back to summary |
|---|---|
| public IntervalTask(Runnable runnable, Duration interval) Create a new | |
| IntervalTask | back to summary |
|---|---|
| public IntervalTask(Runnable runnable, Duration interval, Duration initialDelay) Create a new | |
| IntervalTask | back to summary |
|---|---|
| pack-priv IntervalTask(IntervalTask task) Copy constructor. | |
| getInitialDelay | back to summary |
|---|---|
| public long getInitialDelay()
Return the initial delay before first execution of the task.
| |
| getInitialDelayDuration | back to summary |
|---|---|
| public Duration getInitialDelayDuration() Overrides org. Return the initial delay before first execution of the task.
| |
| getInterval | back to summary |
|---|---|
| public long getInterval()
Return how often in milliseconds the task should be executed.
| |
| getIntervalDuration | back to summary |
|---|---|
| public Duration getIntervalDuration() Return how often the task should be executed.
| |