zyh.util
Class ThreadPool

java.lang.Object
  |
  +--java.lang.ThreadGroup
        |
        +--zyh.util.ThreadPool

public final class ThreadPool
extends java.lang.ThreadGroup

ThreadPool implements a thread pool.


Constructor Summary
ThreadPool()
           
ThreadPool(int initialPoolSize, int maximumPoolSize)
           
 
Method Summary
 void close()
           
protected  java.lang.Runnable getWaitingRunnableObject()
           
 boolean isAllIdle()
           
 boolean isClosed()
           
 void run(java.lang.Runnable runnableObject)
           
 
Methods inherited from class java.lang.ThreadGroup
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString, uncaughtException
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadPool

public ThreadPool(int initialPoolSize,
                  int maximumPoolSize)

ThreadPool

public ThreadPool()
Method Detail

close

public void close()

isClosed

public boolean isClosed()

isAllIdle

public boolean isAllIdle()

getWaitingRunnableObject

protected java.lang.Runnable getWaitingRunnableObject()

run

public void run(java.lang.Runnable runnableObject)