|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.util.ThreadPool
public class ThreadPool
A generic pool of threads available for Alarms and Work tasks.
| Method Summary | |
|---|---|
void |
closeEnvironment(java.lang.ClassLoader env)
Resets the thread pool, letting old threads drain. |
void |
completeExecutorTask()
Called when an executor task completes |
int |
getExecutorTaskMax()
Gets the maximum number of executor threads. |
int |
getFreeThreadCount()
Returns the free thread count. |
int |
getThreadActiveCount()
Returns the active thread count. |
int |
getThreadCount()
Returns the total thread count. |
int |
getThreadIdleCount()
Returns the idle thread count. |
int |
getThreadIdleMax()
Gets the maximum number of idle threads. |
int |
getThreadIdleMin()
Gets the minimum number of idle threads. |
int |
getThreadMax()
Gets the maximum number of threads. |
static ThreadPool |
getThreadPool()
|
int |
getThreadPriority()
|
void |
interrupt()
interrupts all the threads. |
void |
reset()
Resets the thread pool, letting old threads drain. |
boolean |
schedule(java.lang.Runnable task)
Schedules a new task. |
boolean |
schedule(java.lang.Runnable task,
long timeout)
Adds a new task. |
boolean |
scheduleExecutorTask(java.lang.Runnable task)
Schedules an executor task. |
void |
schedulePriority(java.lang.Runnable task)
Adds a new task. |
void |
setExecutorTaskMax(int max)
Sets the maximum number of executor threads. |
void |
setThreadIdleMax(int max)
Sets the maximum number of idle threads. |
void |
setThreadIdleMin(int min)
Sets the minimum number of idle threads. |
void |
setThreadMax(int max)
Sets the maximum number of threads. |
void |
setThreadPriority(int priority)
|
boolean |
start(java.lang.Runnable task)
Adds a new task. |
boolean |
start(java.lang.Runnable task,
long timeout)
Adds a new task. |
void |
startPriority(java.lang.Runnable task)
Adds a new task. |
boolean |
startPriority(java.lang.Runnable task,
long timeout)
Adds a new task. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public static ThreadPool getThreadPool()
public void setThreadMax(int max)
public int getThreadMax()
public void setThreadIdleMin(int min)
public int getThreadIdleMin()
public void setThreadIdleMax(int max)
public int getThreadIdleMax()
public void setExecutorTaskMax(int max)
public int getExecutorTaskMax()
public void setThreadPriority(int priority)
public int getThreadPriority()
public int getThreadCount()
public int getThreadIdleCount()
public int getThreadActiveCount()
public int getFreeThreadCount()
public void reset()
public void closeEnvironment(java.lang.ClassLoader env)
public boolean schedule(java.lang.Runnable task)
public boolean schedule(java.lang.Runnable task,
long timeout)
public void schedulePriority(java.lang.Runnable task)
public boolean scheduleExecutorTask(java.lang.Runnable task)
public void completeExecutorTask()
public boolean start(java.lang.Runnable task)
public boolean start(java.lang.Runnable task,
long timeout)
public void startPriority(java.lang.Runnable task)
public boolean startPriority(java.lang.Runnable task,
long timeout)
public void interrupt()
public java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||