public final class ScheduledTask extends Object
ScheduledTaskRegistrar.scheduleCronTask(CronTask),
ScheduledTaskRegistrar.scheduleFixedRateTask(FixedRateTask),
ScheduledTaskRegistrar.scheduleFixedDelayTask(FixedDelayTask),
ScheduledFuture| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Trigger cancellation of this scheduled task.
|
void |
cancel(boolean mayInterruptIfRunning)
Trigger cancellation of this scheduled task.
|
Task |
getTask()
|
String |
toString() |
public Task getTask()
public void cancel()
This variant will force interruption of the task if still running.
cancel(boolean)public void cancel(boolean mayInterruptIfRunning)
mayInterruptIfRunning - whether to force interruption of the task
if still running (specify false to allow the task to complete)Future.cancel(boolean)