public class SharedThreadPool extends Object implements org.eclipse.jetty.util.thread.ThreadPool, org.eclipse.jetty.util.component.LifeCycle
ThreadPool
that shares a single instance of a thread pool. The first thread pool
passed will win and be used.Constructor and Description |
---|
SharedThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool) |
Modifier and Type | Method and Description |
---|---|
void |
addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) |
void |
execute(Runnable command) |
int |
getIdleThreads() |
int |
getThreads() |
boolean |
isFailed() |
boolean |
isLowOnThreads() |
boolean |
isRunning() |
boolean |
isStarted() |
boolean |
isStarting() |
boolean |
isStopped() |
boolean |
isStopping() |
void |
join() |
void |
removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener) |
void |
start() |
void |
stop() |
String |
toString() |
public SharedThreadPool(org.eclipse.jetty.util.thread.ThreadPool threadPool)
public void join() throws InterruptedException
join
in interface org.eclipse.jetty.util.thread.ThreadPool
InterruptedException
public int getThreads()
getThreads
in interface org.eclipse.jetty.util.thread.ThreadPool
public int getIdleThreads()
getIdleThreads
in interface org.eclipse.jetty.util.thread.ThreadPool
public boolean isLowOnThreads()
isLowOnThreads
in interface org.eclipse.jetty.util.thread.ThreadPool
public void start() throws Exception
start
in interface org.eclipse.jetty.util.component.LifeCycle
Exception
public void stop() throws Exception
stop
in interface org.eclipse.jetty.util.component.LifeCycle
Exception
public boolean isRunning()
isRunning
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStarted()
isStarted
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStarting()
isStarting
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStopping()
isStopping
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isStopped()
isStopped
in interface org.eclipse.jetty.util.component.LifeCycle
public boolean isFailed()
isFailed
in interface org.eclipse.jetty.util.component.LifeCycle
public void addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
addLifeCycleListener
in interface org.eclipse.jetty.util.component.LifeCycle
public void removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
removeLifeCycleListener
in interface org.eclipse.jetty.util.component.LifeCycle
Copyright © GigaSpaces.