Thread.State, Thread.UncaughtExceptionHandler
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier and Type | Method and Description |
---|---|
int |
getTimeoutCount()
get the number of times a timeout condition has been encountered.
|
void |
restartTimer()
Stops the current timer and starts another.
|
void |
run() |
void |
setTimeout(int timeout)
Set the length of time a timer will wait before the timeout condition occurs
|
void |
start()
starts the watchdog thread
|
boolean |
startTimer()
Start a timer.
|
boolean |
stopTimer()
Stops the current timer.
|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, stop, stop, suspend, toString, yield
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
handleTimeout, setName, stop
public WatchDog()
public WatchDog(String name)
name
- public void setTimeout(int timeout)
IWatchDog
setTimeout
in interface IWatchDog
timeout
- millisecondspublic boolean startTimer()
IWatchDog
If the current value of the timeOut elapses before this timer is stopped the watchdog will increment the timeoutCount and call reportTimeout()
startTimer
in interface IWatchDog
public boolean stopTimer()
IWatchDog
public void restartTimer()
IWatchDog
restartTimer
in interface IWatchDog
public int getTimeoutCount()
IWatchDog
getTimeoutCount
in interface IWatchDog
public void start()
IWatchDog
© Copyright IBM Corp. 2013. All rights reserved.