|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.funambol.util.ThreadPool
public class ThreadPool
A default implementation of a ThreadPool built with a maximum number of live threads.
Field Summary | |
---|---|
protected ThreadPoolMonitor |
monitor
|
protected Queue |
queue
|
protected boolean |
stopped
|
Constructor Summary | |
---|---|
ThreadPool(int numberOfThreads)
|
|
ThreadPool(ThreadPoolMonitor monitor,
int numberOfThreads)
|
Method Summary | |
---|---|
int |
getRunnableCount()
Returns number of runnable object in the queue. |
void |
run()
The method run by the pool of background threads |
java.lang.Thread |
startThread()
Start a new thread running |
void |
startThread(java.lang.Runnable task)
Dispatch a new task in the pool to be invoked asynchronously later if possible |
void |
stop()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Queue queue
protected boolean stopped
protected final ThreadPoolMonitor monitor
Constructor Detail |
---|
public ThreadPool(ThreadPoolMonitor monitor, int numberOfThreads)
public ThreadPool(int numberOfThreads)
Method Detail |
---|
public java.lang.Thread startThread()
public void stop()
public int getRunnableCount()
public void startThread(java.lang.Runnable task)
public void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |