|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sourceforge.cvsgrab.util.ThreadPool
public class ThreadPool
Simple fized sized Thread Pool
Constructor Summary | |
---|---|
ThreadPool(int max)
Create a thread pool with max number of threads |
Method Summary | |
---|---|
void |
destroy()
Interrupt all threads and clear the pool This method should only be used to tidy up. |
void |
doTask(Runnable task)
Execute a Runnable task |
static ThreadPool |
getInstance()
|
protected List |
getPool()
Gets the pool. |
static void |
init(int maxThreads)
Initialise the thread pool |
protected boolean |
isStopped()
Gets the stopped. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ThreadPool(int max)
Method Detail |
---|
public static void init(int maxThreads)
maxThreads
- The max number of threadspublic static ThreadPool getInstance()
public void destroy()
public void doTask(Runnable task)
protected List getPool()
protected boolean isStopped()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |