org.jvnet.hudson.test
Class ThreadPoolImpl

java.lang.Object
  extended by org.mortbay.component.AbstractLifeCycle
      extended by org.jvnet.hudson.test.ThreadPoolImpl
All Implemented Interfaces:
org.mortbay.component.LifeCycle, org.mortbay.thread.ThreadPool

public class ThreadPoolImpl
extends org.mortbay.component.AbstractLifeCycle
implements org.mortbay.thread.ThreadPool

Author:
Kohsuke Kawaguchi

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle
org.mortbay.component.LifeCycle.Listener
 
Field Summary
 
Fields inherited from class org.mortbay.component.AbstractLifeCycle
_listeners
 
Constructor Summary
ThreadPoolImpl(ExecutorService es)
           
 
Method Summary
 boolean dispatch(Runnable job)
           
protected  void doStart()
           
protected  void doStop()
           
 int getIdleThreads()
           
 int getThreads()
           
 boolean isLowOnThreads()
           
 void join()
           
 
Methods inherited from class org.mortbay.component.AbstractLifeCycle
addLifeCycleListener, isFailed, isRunning, isStarted, isStarting, isStopped, isStopping, removeLifeCycleListener, start, stop
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolImpl

public ThreadPoolImpl(ExecutorService es)
Method Detail

dispatch

public boolean dispatch(Runnable job)
Specified by:
dispatch in interface org.mortbay.thread.ThreadPool

join

public void join()
          throws InterruptedException
Specified by:
join in interface org.mortbay.thread.ThreadPool
Throws:
InterruptedException

getThreads

public int getThreads()
Specified by:
getThreads in interface org.mortbay.thread.ThreadPool

getIdleThreads

public int getIdleThreads()
Specified by:
getIdleThreads in interface org.mortbay.thread.ThreadPool

isLowOnThreads

public boolean isLowOnThreads()
Specified by:
isLowOnThreads in interface org.mortbay.thread.ThreadPool

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class org.mortbay.component.AbstractLifeCycle
Throws:
Exception

doStop

protected void doStop()
               throws Exception
Overrides:
doStop in class org.mortbay.component.AbstractLifeCycle
Throws:
Exception


Copyright © 2004-2013. All Rights Reserved.