org.openspaces.pu.container.jee.jetty.holder
Class SharedThreadPool
java.lang.Object
org.openspaces.pu.container.jee.jetty.holder.SharedThreadPool
- All Implemented Interfaces:
- org.mortbay.component.LifeCycle, org.mortbay.thread.ThreadPool
public class SharedThreadPool
- extends Object
- implements org.mortbay.thread.ThreadPool, org.mortbay.component.LifeCycle
A Jetty ThreadPool
that shares a single instance of a therad pool. The first
thread pool passed will win and be used.
- Author:
- kimchy
Nested classes/interfaces inherited from interface org.mortbay.component.LifeCycle |
org.mortbay.component.LifeCycle.Listener |
SharedThreadPool
public SharedThreadPool(org.mortbay.thread.ThreadPool delegate)
dispatch
public boolean dispatch(Runnable runnable)
- 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
start
public void start()
throws Exception
- Specified by:
start
in interface org.mortbay.component.LifeCycle
- Throws:
Exception
stop
public void stop()
throws Exception
- Specified by:
stop
in interface org.mortbay.component.LifeCycle
- Throws:
Exception
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interface org.mortbay.component.LifeCycle
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interface org.mortbay.component.LifeCycle
isStarting
public boolean isStarting()
- Specified by:
isStarting
in interface org.mortbay.component.LifeCycle
isStopping
public boolean isStopping()
- Specified by:
isStopping
in interface org.mortbay.component.LifeCycle
isStopped
public boolean isStopped()
- Specified by:
isStopped
in interface org.mortbay.component.LifeCycle
isFailed
public boolean isFailed()
- Specified by:
isFailed
in interface org.mortbay.component.LifeCycle
addLifeCycleListener
public void addLifeCycleListener(org.mortbay.component.LifeCycle.Listener listener)
- Specified by:
addLifeCycleListener
in interface org.mortbay.component.LifeCycle
removeLifeCycleListener
public void removeLifeCycleListener(org.mortbay.component.LifeCycle.Listener listener)
- Specified by:
removeLifeCycleListener
in interface org.mortbay.component.LifeCycle
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © GigaSpaces.