|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.commons.threadpool.DefaultThreadPool
public class DefaultThreadPool
A default implementation of a ThreadPool which is constructed with a given number of threads.
Constructor Summary | |
---|---|
DefaultThreadPool()
|
|
DefaultThreadPool(int numberOfThreads)
|
|
DefaultThreadPool(int numberOfThreads,
int threadPriority)
|
|
DefaultThreadPool(ThreadPoolMonitor monitor,
int numberOfThreads)
|
|
DefaultThreadPool(ThreadPoolMonitor monitor,
int numberOfThreads,
int threadPriority)
|
Method Summary | |
---|---|
int |
getRunnableCount()
Returns number of runnable object in the queue. |
void |
invokeLater(Runnable task)
Dispatch a new task onto this pool to be invoked asynchronously later |
void |
run()
The method ran by the pool of background threads |
void |
setThreadGroup(ThreadGroup threadGroup)
|
Thread |
startThread()
Start a new thread running |
Thread |
startThread(int priority)
|
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultThreadPool(ThreadPoolMonitor monitor, int numberOfThreads, int threadPriority)
public DefaultThreadPool(ThreadPoolMonitor monitor, int numberOfThreads)
public DefaultThreadPool()
public DefaultThreadPool(int numberOfThreads)
public DefaultThreadPool(int numberOfThreads, int threadPriority)
Method Detail |
---|
public void setThreadGroup(ThreadGroup threadGroup)
public Thread startThread()
public Thread startThread(int priority)
public void stop()
public int getRunnableCount()
public void invokeLater(Runnable task)
invokeLater
in interface ThreadPool
public void run()
run
in interface Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |