com.caucho.env.thread
Class ThreadPool

java.lang.Object
  extended by com.caucho.env.thread2.ThreadPool2
      extended by com.caucho.env.thread.ThreadPool
All Implemented Interfaces:
java.util.concurrent.Executor

public final class ThreadPool
extends ThreadPool2

A generic pool of threads available for Alarms and Work tasks.


Field Summary
 
Fields inherited from class com.caucho.env.thread2.ThreadPool2
THREAD_FULL_EVENT
 
Constructor Summary
ThreadPool()
           
ThreadPool(java.lang.String name)
           
 
Method Summary
 void completeExecutorTask()
          Called when an executor task completes
static ThreadPool getCurrent()
           
 int getExecutorTaskMax()
          Gets the maximum number of executor threads.
static ThreadPool getThreadPool()
           
 boolean scheduleExecutorTask(java.lang.Runnable task)
          Schedules an executor task.
protected  ThreadPool setAsGlobal()
           
 void setExecutorTaskMax(int max)
          Sets the maximum number of executor threads.
 
Methods inherited from class com.caucho.env.thread2.ThreadPool2
clearIdleThreads, close, closeEnvironment, execute, getFreeThreadCount, getIdleMax, getIdleMin, getIdleTimeout, getPriorityIdleMin, getThreadActiveCount, getThreadCount, getThreadCreateCountTotal, getThreadIdleCount, getThreadMax, getThreadOverflowCountTotal, getThreadPriorityQueueSize, getThreadStartingCount, getThreadTaskQueueSize, getThreadWaitCount, reset, schedule, schedule, schedule, scheduleImpl, schedulePriority, scheduleUnpark, setAsGlobal, setIdleMax, setIdleMin, setIdleTimeout, setPriorityIdleMin, setThreadMax, setThrottleLimit, setThrottlePeriod, setThrottleSleepTime, start, start, start, startPriority, startPriority, submitNoWake, submitNoWake, toString, wakeScheduler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool()

ThreadPool

public ThreadPool(java.lang.String name)
Method Detail

getCurrent

public static ThreadPool getCurrent()

getThreadPool

public static ThreadPool getThreadPool()

setAsGlobal

protected ThreadPool setAsGlobal()

setExecutorTaskMax

public void setExecutorTaskMax(int max)
Sets the maximum number of executor threads.


getExecutorTaskMax

public int getExecutorTaskMax()
Gets the maximum number of executor threads.


scheduleExecutorTask

public boolean scheduleExecutorTask(java.lang.Runnable task)
Schedules an executor task.


completeExecutorTask

public void completeExecutorTask()
Called when an executor task completes