public class ExecutorThreadPool
extends org.eclipse.jetty.util.component.AbstractLifeCycle
implements org.eclipse.jetty.util.thread.ThreadPool
org.eclipse.jetty.util.component.AbstractLifeCycle.AbstractLifeCycleListener| Constructor and Description |
|---|
ExecutorThreadPool(ExecutorService executor)
Constrcutor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
dispatch(Runnable job)
Dispatch a job
|
protected void |
doStart()
Start
|
protected void |
doStop()
Stop
|
int |
getIdleThreads()
Get the number of idle threads
|
int |
getThreads()
Get the number of threads
|
boolean |
isLowOnThreads()
Is the pool low on threads ?
|
void |
join()
Join - await termination of pool
|
public ExecutorThreadPool(ExecutorService executor)
executor - The executor servicepublic boolean dispatch(Runnable job)
dispatch in interface org.eclipse.jetty.util.thread.ThreadPooljob - The jobpublic int getIdleThreads()
getIdleThreads in interface org.eclipse.jetty.util.thread.ThreadPoolpublic int getThreads()
getThreads in interface org.eclipse.jetty.util.thread.ThreadPoolpublic boolean isLowOnThreads()
isLowOnThreads in interface org.eclipse.jetty.util.thread.ThreadPoolpublic void join()
throws InterruptedException
join in interface org.eclipse.jetty.util.thread.ThreadPoolInterruptedException - Thrown if interruptedprotected void doStart()
throws Exception
doStart in class org.eclipse.jetty.util.component.AbstractLifeCycleException - Thrown if an error occursCopyright © 2021 JBoss by Red Hat. All rights reserved.