public class DelegatingThreadPool extends ContainerLifeCycle implements ThreadPool
AbstractLifeCycle.AbstractLifeCycleListener
ThreadPool.SizedThreadPool
Container.InheritedListener, Container.Listener
LifeCycle.Listener
Constructor and Description |
---|
DelegatingThreadPool(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(Runnable job) |
Executor |
getExecutor() |
int |
getIdleThreads() |
int |
getThreads() |
boolean |
isLowOnThreads() |
void |
join()
Blocks until the thread pool is
stopped . |
void |
setExecutor(Executor executor) |
addBean, addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, dump, dump, dump, dump, dump, dumpBeans, dumpObject, dumpStdErr, dumpThis, getBean, getBeans, getBeans, isManaged, manage, removeBean, removeBeans, removeEventListener, setBeans, setStopTimeout, start, stop, unmanage, updateBean, updateBeans
addLifeCycleListener, getState, getState, getStopTimeout, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
public DelegatingThreadPool(Executor executor)
public Executor getExecutor()
public void setExecutor(Executor executor)
public int getIdleThreads()
getIdleThreads
in interface ThreadPool
public int getThreads()
getThreads
in interface ThreadPool
public boolean isLowOnThreads()
isLowOnThreads
in interface ThreadPool
public void join() throws InterruptedException
ThreadPool
stopped
.join
in interface ThreadPool
InterruptedException
protected void doStop() throws Exception
ContainerLifeCycle
doStop
in class ContainerLifeCycle
Exception
Copyright © 1995-2015 Webtide. All Rights Reserved.