Package org.jvnet.hudson.test
Class ThreadPoolImpl
- java.lang.Object
-
- org.eclipse.jetty.util.component.AbstractLifeCycle
-
- org.jvnet.hudson.test.ThreadPoolImpl
-
- All Implemented Interfaces:
Executor
,org.eclipse.jetty.util.component.LifeCycle
,org.eclipse.jetty.util.thread.ThreadPool
public class ThreadPoolImpl extends org.eclipse.jetty.util.component.AbstractLifeCycle implements org.eclipse.jetty.util.thread.ThreadPool
- Author:
- Kohsuke Kawaguchi
-
-
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
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolImpl(ExecutorService es)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doStart()
protected void
doStop()
void
execute(Runnable job)
int
getIdleThreads()
int
getThreads()
boolean
isLowOnThreads()
void
join()
-
-
-
Constructor Detail
-
ThreadPoolImpl
public ThreadPoolImpl(ExecutorService es)
-
-
Method Detail
-
join
public void join() throws InterruptedException
- Specified by:
join
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
- Throws:
InterruptedException
-
getThreads
public int getThreads()
- Specified by:
getThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
getIdleThreads
public int getIdleThreads()
- Specified by:
getIdleThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
isLowOnThreads
public boolean isLowOnThreads()
- Specified by:
isLowOnThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
doStart
protected void doStart() throws Exception
- Overrides:
doStart
in classorg.eclipse.jetty.util.component.AbstractLifeCycle
- Throws:
Exception
-
-