public class DelegatingThreadPool extends ContainerLifeCycle implements ThreadPool
AbstractLifeCycle.AbstractLifeCycleListenerThreadPool.SizedThreadPoolContainer.InheritedListener, Container.ListenerLifeCycle.ListenerFAILED, RUNNING, STARTED, STARTING, STOP_ON_FAILURE, STOPPED, STOPPING| Constructor and Description |
|---|
DelegatingThreadPool(java.util.concurrent.Executor executor) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doStop()
Stops the managed lifecycle beans in the reverse order they were added.
|
void |
execute(java.lang.Runnable job) |
java.util.concurrent.Executor |
getExecutor() |
int |
getIdleThreads() |
int |
getThreads() |
boolean |
isLowOnThreads() |
void |
join()
Blocks until the thread pool is
stopped. |
void |
setExecutor(java.util.concurrent.Executor executor) |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBean, updateBeansaddLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stoppublic DelegatingThreadPool(java.util.concurrent.Executor executor)
public java.util.concurrent.Executor getExecutor()
public void setExecutor(java.util.concurrent.Executor executor)
public void execute(java.lang.Runnable job)
execute in interface java.util.concurrent.Executorpublic int getIdleThreads()
getIdleThreads in interface ThreadPoolpublic int getThreads()
getThreads in interface ThreadPoolpublic boolean isLowOnThreads()
isLowOnThreads in interface ThreadPoolpublic void join()
throws java.lang.InterruptedException
ThreadPoolstopped.join in interface ThreadPooljava.lang.InterruptedException - if thread was interruptedprotected void doStop()
throws java.lang.Exception
ContainerLifeCycledoStop in class ContainerLifeCyclejava.lang.ExceptionCopyright © 1995–2018 Webtide. All rights reserved.