Class PausableThreadPoolExecutor
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
fr.ens.biologie.genomique.eoulsan.core.schedulers.PausableThreadPoolExecutor
- All Implemented Interfaces:
Executor,ExecutorService
This class define a Pausable thread pool executor. This class is based on the javadoc
documentation of the ThreadPoolExecutor class.
- Since:
- 2.0
-
Nested Class Summary
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
ThreadPoolExecutor.AbortPolicy, ThreadPoolExecutor.CallerRunsPolicy, ThreadPoolExecutor.DiscardOldestPolicy, ThreadPoolExecutor.DiscardPolicy -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.concurrent.ThreadPoolExecutor
allowCoreThreadTimeOut, allowsCoreThreadTimeOut, awaitTermination, execute, getActiveCount, getCompletedTaskCount, getCorePoolSize, getKeepAliveTime, getLargestPoolSize, getMaximumPoolSize, getPoolSize, getQueue, getRejectedExecutionHandler, getTaskCount, getThreadFactory, isShutdown, isTerminated, isTerminating, prestartAllCoreThreads, prestartCoreThread, purge, remove, setCorePoolSize, setKeepAliveTime, setMaximumPoolSize, setRejectedExecutionHandler, setThreadFactory, shutdown, shutdownNow, toString
-
Constructor Details
-
PausableThreadPoolExecutor
public PausableThreadPoolExecutor(int threadNumber) public constructor.- Parameters:
threadNumber- number of threads
-
-
Method Details
-
submit
Submit a task.- Type Parameters:
T- result class- Parameters:
task- the task to submmitresult- the resultrequiredProcessors- the required processor number- Returns:
- a Future task
-
pause
public void pause()Pause the executor. -
resume
public void resume()Resume the executor.
-