public final class JAThreadManager extends Object implements ThreadManager
| Constructor and Description |
|---|
JAThreadManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
The close method is used to stop all the threads as they become idle.
|
void |
logException(boolean fatal,
String msg,
Exception exception) |
static ThreadManager |
newThreadManager(int threadCount)
Create a JAThreadManager
|
static ThreadManager |
newThreadManager(int threadCount,
ThreadFactory threadFactory)
Create a JAThreadManager
|
void |
process(Runnable task)
Begin running a task.
|
void |
start(int threadCount,
ThreadFactory threadFactory)
Create and start the concurrent.
|
public static ThreadManager newThreadManager(int threadCount)
threadCount - The number of concurrent to be used.public static ThreadManager newThreadManager(int threadCount, ThreadFactory threadFactory)
threadCount - The number of concurrent to be used.threadFactory - Used to create the concurrent.public final void start(int threadCount,
ThreadFactory threadFactory)
start in interface ThreadManagerthreadCount - The number of concurrent to be used.threadFactory - Used to create the concurrent.public final void process(Runnable task)
process in interface ThreadManagertask - A task to be processed on another thread.public final void close()
close in interface ThreadManagerpublic void logException(boolean fatal,
String msg,
Exception exception)
logException in interface ThreadManagerCopyright © 2012. All Rights Reserved.