Top Description Methods
org.mortbay.thread

public Interface ThreadPool

Known Direct Implementers
org.mortbay.thread.BoundedThreadPool, org.mortbay.thread.QueuedThreadPool
Imports
org.mortbay.component.LifeCycle

ThreadPool.
Author
gregw

Method Summary

Modifier and TypeMethod and Description
public boolean
public int

Returns:

The number of idle threads in the pool
getIdleThreads
()

public int

Returns:

The total number of threads currently in the pool
getThreads
()

public boolean

Returns:

True if the pool is low on threads
isLowOnThreads
()

public void
join()

Blocks until the thread pool is stopped.

Method Detail

dispatchback to summary
public boolean dispatch(Runnable job)
getIdleThreadsback to summary
public int getIdleThreads()
Returns:int

The number of idle threads in the pool

getThreadsback to summary
public int getThreads()
Returns:int

The total number of threads currently in the pool

isLowOnThreadsback to summary
public boolean isLowOnThreads()
Returns:boolean

True if the pool is low on threads

joinback to summary
public void join() throws InterruptedException

Blocks until the thread pool is stopped.