|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.objectweb.jonas_timer.TimerManager
A timer manager manages 2 lists of timers with 2 threads One thread is a clock which decrements timers every second and passes them when expired in a list of expired timers. The other thread looks in the list of expired timers to process them.
Method Summary | |
TimerEvent |
addTimer(TimerEventListener tel,
long timeout,
java.lang.Object arg,
boolean permanent)
add a new timer in the list |
void |
batch()
process all expired timers |
void |
clock()
cney speed up the clock x1000 when shutting down update all timers in the list each timer expired is put in a special list of expired timers they will be processed then by the Batch Thread. |
static TimerManager |
getInstance()
Get an instance of the TimerManager |
void |
removeTimer(TimerEvent te)
Deprecated. |
static void |
stop()
|
static void |
stop(boolean force)
stop the service |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static TimerManager getInstance()
public static void stop(boolean force)
force
- tell the manager NOT to wait for the timers to be completedpublic static void stop()
public void clock()
public void batch()
public TimerEvent addTimer(TimerEventListener tel, long timeout, java.lang.Object arg, boolean permanent)
public void removeTimer(TimerEvent te)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |