compbio.engine.local
Class LocalExecutorService

java.lang.Object
  extended by java.util.concurrent.AbstractExecutorService
      extended by java.util.concurrent.ThreadPoolExecutor
          extended by compbio.engine.local.LocalExecutorService
All Implemented Interfaces:
java.util.concurrent.Executor, java.util.concurrent.ExecutorService

public final class LocalExecutorService
extends java.util.concurrent.ThreadPoolExecutor


Nested Class Summary
 
Nested classes/interfaces inherited from class java.util.concurrent.ThreadPoolExecutor
java.util.concurrent.ThreadPoolExecutor.AbortPolicy, java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardOldestPolicy, java.util.concurrent.ThreadPoolExecutor.DiscardPolicy
 
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
 
Methods inherited from class java.util.concurrent.AbstractExecutorService
invokeAll, invokeAll, invokeAny, invokeAny, submit, submit, submit
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getExecutor

public static LocalExecutorService getExecutor()
This method returns the single instance of CachedThreadPoolExecutor which it cashes internally

Returns:

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


canAcceptMoreWork

public boolean canAcceptMoreWork()
If the Executor queue is empty

Returns:
true is not all threads are busy, false overwise