Package org.openrefine.util.threads
Class ThreadPoolExecutorAdapter
- java.lang.Object
-
- org.openrefine.util.threads.ThreadPoolExecutorAdapter
-
- All Implemented Interfaces:
Executor
,org.eclipse.jetty.util.component.LifeCycle
,org.eclipse.jetty.util.thread.ThreadPool
public class ThreadPoolExecutorAdapter extends Object implements org.eclipse.jetty.util.thread.ThreadPool, org.eclipse.jetty.util.component.LifeCycle
JettyThreadPool
that bridges requests to aThreadPoolExecutor
.
-
-
Constructor Summary
Constructors Constructor Description ThreadPoolExecutorAdapter(ThreadPoolExecutor executor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
void
execute(Runnable job)
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()
-
-
-
Constructor Detail
-
ThreadPoolExecutorAdapter
public ThreadPoolExecutorAdapter(ThreadPoolExecutor executor)
-
-
Method Detail
-
getIdleThreads
public int getIdleThreads()
- Specified by:
getIdleThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
getThreads
public int getThreads()
- Specified by:
getThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
isLowOnThreads
public boolean isLowOnThreads()
- Specified by:
isLowOnThreads
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
-
join
public void join() throws InterruptedException
- Specified by:
join
in interfaceorg.eclipse.jetty.util.thread.ThreadPool
- Throws:
InterruptedException
-
isFailed
public boolean isFailed()
- Specified by:
isFailed
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isRunning
public boolean isRunning()
- Specified by:
isRunning
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStarted
public boolean isStarted()
- Specified by:
isStarted
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStarting
public boolean isStarting()
- Specified by:
isStarting
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStopped
public boolean isStopped()
- Specified by:
isStopped
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
isStopping
public boolean isStopping()
- Specified by:
isStopping
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
start
public void start() throws Exception
- Specified by:
start
in interfaceorg.eclipse.jetty.util.component.LifeCycle
- Throws:
Exception
-
stop
public void stop() throws Exception
- Specified by:
stop
in interfaceorg.eclipse.jetty.util.component.LifeCycle
- Throws:
Exception
-
addLifeCycleListener
public void addLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
- Specified by:
addLifeCycleListener
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
removeLifeCycleListener
public void removeLifeCycleListener(org.eclipse.jetty.util.component.LifeCycle.Listener listener)
- Specified by:
removeLifeCycleListener
in interfaceorg.eclipse.jetty.util.component.LifeCycle
-
-