org.eclipse.net4j.util.concurrent
Class MonitoredThread.MultiThreadMonitor
java.lang.Object
org.eclipse.net4j.util.concurrent.MonitoredThread.MultiThreadMonitor
- All Implemented Interfaces:
- Runnable, MonitoredThread.ThreadMonitor
- Enclosing class:
- MonitoredThread
- public static class MonitoredThread.MultiThreadMonitor
- extends Object
- implements MonitoredThread.ThreadMonitor, Runnable
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SYNCED_START
public static final long SYNCED_START
- See Also:
- Constant Field Values
MonitoredThread.MultiThreadMonitor
public MonitoredThread.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_START
means that all threads start at the same time by waiting on a shared latch.
MonitoredThread.MultiThreadMonitor
public MonitoredThread.MultiThreadMonitor(long timeOut)
- Same as calling MonitoredThread(idleTimeOut, SYNCED_START).
getIdleTimeOut
public long getIdleTimeOut()
addThread
public void addThread(MonitoredThread thread)
handleStarting
public void handleStarting(MonitoredThread thread)
- Specified by:
handleStarting
in interface MonitoredThread.ThreadMonitor
handleFinished
public void handleFinished(MonitoredThread thread)
- Specified by:
handleFinished
in interface MonitoredThread.ThreadMonitor
run
public void run()
- Specified by:
run
in interface Runnable
handleTimeoutExpiration
protected void handleTimeoutExpiration(MonitoredThread thread)
Copyright (c) 2004 - 2012 Eike Stepper (Berlin, Germany) and others.