Class SharedThreadPool
java.lang.Object
org.openspaces.pu.container.jee.jetty.holder.SharedThreadPool
- All Implemented Interfaces:
Executor,org.eclipse.jetty.util.component.LifeCycle,org.eclipse.jetty.util.thread.ThreadPool
public class SharedThreadPool
extends Object
implements org.eclipse.jetty.util.thread.ThreadPool, org.eclipse.jetty.util.component.LifeCycle
A Jetty
ThreadPool that shares a single instance of a thread pool. The first thread pool
passed will win and be used.- Author:
- kimchy
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.component.LifeCycle
org.eclipse.jetty.util.component.LifeCycle.ListenerNested classes/interfaces inherited from interface org.eclipse.jetty.util.thread.ThreadPool
org.eclipse.jetty.util.thread.ThreadPool.SizedThreadPool -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddEventListener(EventListener eventListener) voidintintbooleanisFailed()booleanbooleanbooleanbooleanbooleanbooleanvoidjoin()booleanremoveEventListener(EventListener eventListener) voidstart()voidstop()toString()
-
Constructor Details
-
SharedThreadPool
public SharedThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
-
-
Method Details
-
execute
-
join
- Specified by:
joinin interfaceorg.eclipse.jetty.util.thread.ThreadPool- Throws:
InterruptedException
-
getThreads
public int getThreads()- Specified by:
getThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
getIdleThreads
public int getIdleThreads()- Specified by:
getIdleThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
isLowOnThreads
public boolean isLowOnThreads()- Specified by:
isLowOnThreadsin interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
start
- Specified by:
startin interfaceorg.eclipse.jetty.util.component.LifeCycle- Throws:
Exception
-
stop
- Specified by:
stopin interfaceorg.eclipse.jetty.util.component.LifeCycle- Throws:
Exception
-
isRunning
public boolean isRunning()- Specified by:
isRunningin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStarted
public boolean isStarted()- Specified by:
isStartedin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStarting
public boolean isStarting()- Specified by:
isStartingin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStopping
public boolean isStopping()- Specified by:
isStoppingin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStopped
public boolean isStopped()- Specified by:
isStoppedin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isFailed
public boolean isFailed()- Specified by:
isFailedin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
addEventListener
- Specified by:
addEventListenerin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
removeEventListener
- Specified by:
removeEventListenerin interfaceorg.eclipse.jetty.util.component.LifeCycle
-
toString
-