public interface Timer
TimerTasks for one-time future execution in a background
thread.| Modifier and Type | Method and Description |
|---|---|
boolean |
isStop()
the timer is stop
|
Timeout |
newTimeout(TimerTask task,
long delay,
TimeUnit unit)
Schedules the specified
TimerTask for one-time execution after
the specified delay. |
Set<Timeout> |
stop()
Releases all resources acquired by this
Timer and cancels all
tasks which were scheduled but not executed yet. |
Timeout newTimeout(TimerTask task, long delay, TimeUnit unit)
TimerTask for one-time execution after
the specified delay.IllegalStateException - if this timer has been stopped alreadyRejectedExecutionException - if the pending timeouts are too many and creating new timeout
can cause instability in the system.Set<Timeout> stop()
Timer and cancels all
tasks which were scheduled but not executed yet.boolean isStop()
Copyright © 2011–2022 The Apache Software Foundation. All rights reserved.