public class ThreadPoolExecutorAdapter extends AbstractLifeCycle implements ThreadPool
ThreadPool that bridges requests to a ThreadPoolExecutor.AbstractLifeCycle.AbstractLifeCycleListenerThreadPool.SizedThreadPoolLifeCycle.Listener_listeners, FAILED, RUNNING, STARTED, STARTING, STOPPED, STOPPING| Constructor and Description |
|---|
ThreadPoolExecutorAdapter(ThreadPoolExecutor executor) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatch(Runnable job) |
protected void |
doStart() |
protected void |
doStop() |
int |
getIdleThreads() |
int |
getThreads() |
boolean |
isFailed() |
boolean |
isLowOnThreads() |
boolean |
isRunning() |
boolean |
isStarted() |
boolean |
isStarting() |
boolean |
isStopped() |
boolean |
isStopping() |
void |
join()
Blocks until the thread pool is
stopped. |
addLifeCycleListener, getState, getState, removeLifeCycleListener, start, stoppublic ThreadPoolExecutorAdapter(ThreadPoolExecutor executor)
public boolean dispatch(Runnable job)
dispatch in interface ThreadPoolpublic int getIdleThreads()
getIdleThreads in interface ThreadPoolpublic int getThreads()
getThreads in interface ThreadPoolpublic boolean isLowOnThreads()
isLowOnThreads in interface ThreadPoolpublic void join()
throws InterruptedException
ThreadPoolstopped.join in interface ThreadPoolInterruptedExceptionpublic boolean isFailed()
isFailed in interface LifeCycleisFailed in class AbstractLifeCyclepublic boolean isRunning()
isRunning in interface LifeCycleisRunning in class AbstractLifeCyclepublic boolean isStarted()
isStarted in interface LifeCycleisStarted in class AbstractLifeCycleLifeCycle.start(),
LifeCycle.isStarting()public boolean isStarting()
isStarting in interface LifeCycleisStarting in class AbstractLifeCycleLifeCycle.isStarted()public boolean isStopped()
isStopped in interface LifeCycleisStopped in class AbstractLifeCycleLifeCycle.stop(),
LifeCycle.isStopping()public boolean isStopping()
isStopping in interface LifeCycleisStopping in class AbstractLifeCycleLifeCycle.isStopped()protected void doStart()
throws Exception
doStart in class AbstractLifeCycleExceptionprotected void doStop()
throws Exception
doStop in class AbstractLifeCycleExceptionCopyright © 1995-2012 Mort Bay Consulting. All Rights Reserved.