public static class MonitoredThread.MultiThreadMonitor extends java.lang.Object implements MonitoredThread.ThreadMonitor, java.lang.Runnable
| Modifier and Type | Field and Description |
|---|---|
static long |
SYNCED_START |
| Constructor and Description |
|---|
MultiThreadMonitor(long timeOut)
Same as calling MonitoredThread(idleTimeOut, SYNCED_START).
|
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 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 MultiThreadMonitor(long timeOut)
public long getIdleTimeOut()
public void addThread(MonitoredThread thread)
public void handleStarting(MonitoredThread thread)
handleStarting in interface MonitoredThread.ThreadMonitorpublic void handleFinished(MonitoredThread thread)
handleFinished in interface MonitoredThread.ThreadMonitorpublic void run()
run in interface java.lang.Runnableprotected void handleTimeoutExpiration(MonitoredThread thread)
Copyright (c) 2004-2019 Eike Stepper (Loehne, Germany) and others.
All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html