Class MonitoredThread.MultiThreadMonitor
- java.lang.Object
- 
- org.eclipse.net4j.util.concurrent.MonitoredThread.MultiThreadMonitor
 
- 
- All Implemented Interfaces:
- java.lang.Runnable,- MonitoredThread.ThreadMonitor
 - Enclosing class:
- MonitoredThread
 
 public static class MonitoredThread.MultiThreadMonitor extends java.lang.Object implements MonitoredThread.ThreadMonitor, java.lang.Runnable - Author:
- Eike Stepper
 
- 
- 
Field SummaryFields Modifier and Type Field Description static longSYNCED_START
 - 
Constructor SummaryConstructors Constructor Description MultiThreadMonitor(long timeOut)Same as calling MonitoredThread(idleTimeOut, SYNCED_START).MultiThreadMonitor(long idleTimeOut, long startOffset)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddThread(MonitoredThread thread)longgetIdleTimeOut()voidhandleFinished(MonitoredThread thread)voidhandleStarting(MonitoredThread thread)protected voidhandleTimeoutExpiration(MonitoredThread thread)voidrun()
 
- 
- 
- 
Field Detail- 
SYNCED_STARTpublic static final long SYNCED_START - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
MultiThreadMonitorpublic MultiThreadMonitor(long idleTimeOut, long startOffset)- Parameters:
- idleTimeOut- The number of milli seconds one of the threads may be idle (i.e. not having called- MonitoredThread.heartBeat()) before- handleTimeoutExpiration(MonitoredThread)is called.
- startOffset- The number of milli seconds to sleep between threads are started. Zero means not to sleep and- SYNCED_STARTmeans that all threads start at the same time by waiting on a shared latch.
 
 - 
MultiThreadMonitorpublic MultiThreadMonitor(long timeOut) Same as calling MonitoredThread(idleTimeOut, SYNCED_START).
 
- 
 - 
Method Detail- 
getIdleTimeOutpublic long getIdleTimeOut() 
 - 
addThreadpublic void addThread(MonitoredThread thread) 
 - 
handleStartingpublic void handleStarting(MonitoredThread thread) - Specified by:
- handleStartingin interface- MonitoredThread.ThreadMonitor
 
 - 
handleFinishedpublic void handleFinished(MonitoredThread thread) - Specified by:
- handleFinishedin interface- MonitoredThread.ThreadMonitor
 
 - 
runpublic void run() - Specified by:
- runin interface- java.lang.Runnable
 
 - 
handleTimeoutExpirationprotected void handleTimeoutExpiration(MonitoredThread thread) 
 
- 
 
-