public class ThreadManager extends Object
Modifier and Type | Class and Description |
---|---|
static interface |
ThreadManager.MyRunnable
MyRunnable
|
Modifier and Type | Field and Description |
---|---|
boolean |
debug |
static int |
MAX_THREADS |
Constructor and Description |
---|
ThreadManager() |
ThreadManager(int maxThreads) |
ThreadManager(String theName)
Constructor with name specified
|
Modifier and Type | Method and Description |
---|---|
void |
addRunnable(ThreadManager.MyRunnable runnable) |
static void |
clearTimes() |
void |
debug(String msg) |
static void |
doWork(int amt,
int[] A) |
List<Exception> |
getExceptions()
Return the list of any exceptions that were thrown when running the threads
|
int |
getNumRunnables() |
void |
handleException(Exception exc) |
static void |
main(String[] args)
Main method for testing
|
void |
runAllParallel() |
void |
runInParallel() |
void |
runInParallel(boolean doAverage) |
void |
runInParallel(int maxThreads) |
void |
runnableStarted() |
void |
runnableStopped() |
void |
runSequentially() |
static void |
setGlobalMaxThreads(int max) |
public boolean debug
public static final int MAX_THREADS
public ThreadManager()
public ThreadManager(String theName)
theName
- public ThreadManager(int maxThreads)
maxThreads
- public static void setGlobalMaxThreads(int max)
max
- public void debug(String msg)
public static void clearTimes()
public void addRunnable(ThreadManager.MyRunnable runnable)
runnable
- public void handleException(Exception exc)
exc
- public void runnableStopped()
public void runnableStarted()
public int getNumRunnables()
public void runInParallel(int maxThreads) throws VisADException, RemoteException
maxThreads
- RemoteException
VisADException
public void runSequentially() throws VisADException, RemoteException
RemoteException
VisADException
public void runAllParallel() throws VisADException, RemoteException
RemoteException
VisADException
public void runInParallel() throws VisADException, RemoteException
RemoteException
VisADException
public void runInParallel(boolean doAverage) throws VisADException, RemoteException
doAverage
- RemoteException
VisADException
public List<Exception> getExceptions()
public static final void doWork(int amt, int[] A)
Copyright © 1996–2023 The SSEC Visualization Project. All rights reserved.