|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread net.sourceforge.cruisecontrol.util.threadpool.ThreadQueue
Used to encapsulate the concept of a Thread Pool
The queue accepts tasks that implement the WorkerThread interface. Each task may be named, but do not have to be. You may then waitOn for ever task to complete or just the named tasks you care about... or not wait at all.
Field Summary |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
ThreadQueue()
|
Method Summary | |
static void |
addTask(WorkerThread task)
Adds a task to the idleList to be executed |
static java.lang.String |
findPosition(java.lang.String taskName)
This may not *always* work -- a task may slip by us between queue checks. |
static java.util.List |
getBusyTaskNames()
|
static java.util.List |
getIdleTaskNames()
|
static boolean |
isActive(java.lang.String taskName)
Checks to see if a specific task is either running or waiting in our system |
void |
run()
|
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public ThreadQueue()
Method Detail |
public void run()
public static void addTask(WorkerThread task)
public static java.lang.String findPosition(java.lang.String taskName)
public static boolean isActive(java.lang.String taskName)
public static java.util.List getBusyTaskNames()
public static java.util.List getIdleTaskNames()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |