compbio.engine.local
Class LocalExecutorService
java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
compbio.engine.local.LocalExecutorService
- All Implemented Interfaces:
- Executor, ExecutorService
public final class LocalExecutorService
- extends ThreadPoolExecutor
Method Summary |
boolean |
canAcceptMoreWork()
If the Executor queue is empty |
static LocalExecutorService |
getExecutor()
This method returns the single instance of CachedThreadPoolExecutor which
it cashes internally |
static void |
shutDown()
This stops all executing processes via interruption. |
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 |
getExecutor
public static LocalExecutorService getExecutor()
- This method returns the single instance of CachedThreadPoolExecutor which
it cashes internally
- Returns:
- the instance
shutDown
public static void shutDown()
- This stops all executing processes via interruption. Thus it is vital
that all processes that use this service respond to interruption
Stops internal executor service which captures streams of native
executables. This method is intended for stopping service if deployed in
the web application context. There is NO NEED of using this method
otherwise as the executor service is taken care of internally.
canAcceptMoreWork
public boolean canAcceptMoreWork()
- If the Executor queue is empty
- Returns:
- true is not all threads are busy, false otherwise