|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.james.util.watchdog.InaccurateTimeoutWatchdog
public class InaccurateTimeoutWatchdog
This class represents an watchdog process that serves to monitor a situation and triggers an action after a certain time has passed. This implementation is deliberately inaccurate, trading accuracy for minimal impact on reset. This should be used when the time of the Watchdog trigger is not critical, and a high number of resets are expected.
Constructor Summary | |
---|---|
InaccurateTimeoutWatchdog(long timeout,
WatchdogTarget target,
org.apache.excalibur.thread.ThreadPool threadPool)
The sole constructor for the InaccurateTimeoutWatchdog |
Method Summary | |
---|---|
void |
dispose()
|
void |
reset()
Reset this Watchdog. |
void |
run()
Execute the body of the Watchdog, triggering as appropriate. |
void |
start()
Start this Watchdog, causing it to begin checking. |
void |
stop()
Stop this Watchdog, causing the Watchdog to stop checking the trigger condition. |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public InaccurateTimeoutWatchdog(long timeout, WatchdogTarget target, org.apache.excalibur.thread.ThreadPool threadPool)
timeout
- the time (in msec) that it will take the Watchdog to timeouttarget
- the WatchdogTarget to be executed when this Watchdog expiresthreadPool
- the thread pool used to generate threads for this implementation.Method Detail |
---|
public void start()
start
in interface Watchdog
public void reset()
reset
in interface Watchdog
public void stop()
stop
in interface Watchdog
public void run()
run
in interface java.lang.Runnable
public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
Disposable.dispose()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |