public static class MonitoredThread.MultiThreadMonitor extends Object implements MonitoredThread.ThreadMonitor, Runnable
Modifier and Type | Field and Description |
---|---|
static long |
SYNCED_START |
Constructor and Description |
---|
MonitoredThread.MultiThreadMonitor(long timeOut)
Same as calling MonitoredThread(idleTimeOut, SYNCED_START).
|
MonitoredThread.MultiThreadMonitor(long idleTimeOut,
long startOffset) |
Modifier and Type | Method and Description |
---|---|
void |
addThread(MonitoredThread thread) |
long |
getIdleTimeOut() |
void |
handleFinished(MonitoredThread thread) |
void |
handleStarting(MonitoredThread thread) |
protected void |
handleTimeoutExpiration(MonitoredThread thread) |
void |
run() |
public static final long SYNCED_START
public MonitoredThread.MultiThreadMonitor(long idleTimeOut, long startOffset)
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.public MonitoredThread.MultiThreadMonitor(long timeOut)
public long getIdleTimeOut()
public void addThread(MonitoredThread thread)
public void handleStarting(MonitoredThread thread)
handleStarting
in interface MonitoredThread.ThreadMonitor
public void handleFinished(MonitoredThread thread)
handleFinished
in interface MonitoredThread.ThreadMonitor
protected void handleTimeoutExpiration(MonitoredThread thread)
Copyright (c) 2011-2014 Eike Stepper (Berlin, Germany) and others.