org.zkoss.util
Class ScalableTimerTask
java.lang.Object
java.util.TimerTask
org.zkoss.util.ScalableTimerTask
- All Implemented Interfaces:
- Runnable
public abstract class ScalableTimerTask
- extends TimerTask
A task that can be scheduled for one-time execution by
a scalable timer (ScalableTimer.
- Since:
- 3.0.1
- Author:
- tomyeh
|
Method Summary |
boolean |
cancel()
Cancels this timer task. |
abstract void |
exec()
The action to be performed by this timer task. |
void |
run()
Invokes exec(). |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ScalableTimerTask
public ScalableTimerTask()
exec
public abstract void exec()
- The action to be performed by this timer task.
The derived class must override this method instead of
run().
run
public final void run()
- Invokes
exec().
The derived class shall not override this method.
Rather, override exec() instead.
- Specified by:
run in interface Runnable- Specified by:
run in class TimerTask
cancel
public boolean cancel()
- Cancels this timer task.
- Overrides:
cancel in class TimerTask
- Returns:
- true if this task is scheduled for one-time execution and has not yet run.
Returns false if the task was scheduled for one-time execution and has already run.
Copyright © 2011. All Rights Reserved.