| org.apache.james.util.watchdog.InaccurateTimeoutWatchdog
InaccurateTimeoutWatchdog | public class InaccurateTimeoutWatchdog extends AbstractLogEnabled implements Watchdog,Runnable,Disposable(Code) | | 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.
|
Method Summary | |
public void | dispose() | public void | reset() Reset this Watchdog. | public void | run() Execute the body of the Watchdog, triggering as appropriate. | public void | start() Start this Watchdog, causing it to begin checking. | public void | stop() Stop this Watchdog, causing the Watchdog to stop checking the trigger
condition. |
InaccurateTimeoutWatchdog | public InaccurateTimeoutWatchdog(long timeout, WatchdogTarget target, ThreadPool threadPool)(Code) | | The sole constructor for the InaccurateTimeoutWatchdog
Parameters: timeout - the time (in msec) that it will take the Watchdog to timeout Parameters: target - the WatchdogTarget to be executed when this Watchdog expires Parameters: threadPool - the thread pool used to generate threads for this implementation. |
dispose | public void dispose()(Code) | | See Also: org.apache.avalon.framework.activity.Disposable.dispose |
reset | public void reset()(Code) | | Reset this Watchdog. Tells the Watchdog thread to reset
the timer when it next awakens.
|
run | public void run()(Code) | | Execute the body of the Watchdog, triggering as appropriate.
|
start | public void start()(Code) | | Start this Watchdog, causing it to begin checking.
|
stop | public void stop()(Code) | | Stop this Watchdog, causing the Watchdog to stop checking the trigger
condition. The monitor can be restarted with a call to startWatchdog.
|
|
|