org.mortbay.thread
Interface ThreadPool
- All Known Implementing Classes:
- BoundedThreadPool
- public interface ThreadPool
ThreadPool.
- Author:
- gregw
dispatch
public boolean dispatch(Runnable job)
join
public void join()
throws InterruptedException
- Blocks until the thread pool is
stopped
.
- Throws:
InterruptedException
getThreads
public int getThreads()
- Returns:
- The total number of threads currently in the pool
getIdleThreads
public int getIdleThreads()
- Returns:
- The number of idle threads in the pool
isLowOnThreads
public boolean isLowOnThreads()
- Returns:
- True if the pool is low on threads