Package org.eclipse.jetty.http.spi
Class DelegatingThreadPool
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.eclipse.jetty.util.component.ContainerLifeCycle
-
- org.eclipse.jetty.http.spi.DelegatingThreadPool
-
- All Implemented Interfaces:
java.util.concurrent.Executor,org.eclipse.jetty.util.component.Container,org.eclipse.jetty.util.component.Destroyable,org.eclipse.jetty.util.component.Dumpable,org.eclipse.jetty.util.component.LifeCycle,org.eclipse.jetty.util.thread.ThreadPool,org.eclipse.jetty.util.thread.TryExecutor
public class DelegatingThreadPool extends org.eclipse.jetty.util.component.ContainerLifeCycle implements org.eclipse.jetty.util.thread.ThreadPool, org.eclipse.jetty.util.thread.TryExecutor
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener, org.eclipse.jetty.util.component.AbstractLifeCycle.StopException
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.Container
org.eclipse.jetty.util.component.Container.InheritedListener, org.eclipse.jetty.util.component.Container.Listener
-
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.Listener
-
-
Constructor Summary
Constructors Constructor Description DelegatingThreadPool(java.util.concurrent.Executor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddoStop()voidexecute(java.lang.Runnable job)java.util.concurrent.ExecutorgetExecutor()intgetIdleThreads()intgetThreads()booleanisLowOnThreads()voidjoin()voidsetExecutor(java.util.concurrent.Executor executor)booleantryExecute(java.lang.Runnable task)-
Methods inherited from class org.eclipse.jetty.util.component.ContainerLifeCycle
addBean, addBean, addEventListener, addManaged, contains, destroy, doStart, dump, dump, dump, dumpObjects, dumpStdErr, getBean, getBeans, getBeans, getContainedBeans, getContainedBeans, isAuto, isManaged, isUnmanaged, manage, removeBean, removeBeans, removeEventListener, setBeans, start, stop, unmanage, updateBean, updateBean, updateBeans
-
Methods inherited from class org.eclipse.jetty.util.component.AbstractLifeCycle
getEventListeners, getState, getState, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, setEventListeners, start, stop, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getExecutor
public java.util.concurrent.Executor getExecutor()
-
setExecutor
public void setExecutor(java.util.concurrent.Executor executor)
-
execute
public void execute(java.lang.Runnable job)
- Specified by:
executein interfacejava.util.concurrent.Executor- Specified by:
executein interfaceorg.eclipse.jetty.util.thread.TryExecutor
-
tryExecute
public boolean tryExecute(java.lang.Runnable task)
- Specified by:
tryExecutein interfaceorg.eclipse.jetty.util.thread.TryExecutor
-
getIdleThreads
public int getIdleThreads()
- Specified by:
getIdleThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
getThreads
public int getThreads()
- Specified by:
getThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
isLowOnThreads
public boolean isLowOnThreads()
- Specified by:
isLowOnThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
join
public void join() throws java.lang.InterruptedException- Specified by:
joinin interfaceorg.eclipse.jetty.util.thread.ThreadPool- Throws:
java.lang.InterruptedException
-
doStop
protected void doStop() throws java.lang.Exception- Overrides:
doStopin classorg.eclipse.jetty.util.component.ContainerLifeCycle- Throws:
java.lang.Exception
-
-