public interface TimerFuture
TimerTask getTask()
boolean cancel()
cancel is called,
this task should never run. If the task has already started,
then the mayInterruptIfRunning parameter determines
whether the thread executing this task should be interrupted in
an attempt to stop the task.
After this method returns, subsequent calls to isDone() will
always return true. Subsequent calls to isCancelled()
will always return true if this method returned true.
boolean isCancelled()
true if this task was cancelled before it completed
normally.true if this task was cancelled before it completedboolean isDone()
true if this task completed.
Completion may be due to normal termination, an exception, or
cancellation -- in all of these cases, this method will return
true.true if this task completedCopyright © 2023. All rights reserved.