Class InterruptableExecutor

java.lang.Object
java.util.concurrent.AbstractExecutorService
java.util.concurrent.ThreadPoolExecutor
heros.solver.CountingThreadPoolExecutor
soot.jimple.infoflow.solver.executors.InterruptableExecutor
All Implemented Interfaces:
Executor, ExecutorService
Direct Known Subclasses:
SetPoolExecutor

public class InterruptableExecutor extends heros.solver.CountingThreadPoolExecutor
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
  • Constructor Details

    • InterruptableExecutor

      public InterruptableExecutor(int corePoolSize, int maximumPoolSize, long keepAliveTime, TimeUnit unit, BlockingQueue<Runnable> workQueue)
  • Method Details

    • interrupt

      public void interrupt()
      Interrupts the executor. This will make the awaitCompletion() methods return immediately and silently reject all new tasks.
    • reset

      public void reset()
      Resets the executor to allow for new tasks once all previous tasks have completed or after the executor has been interrupted.
    • execute

      public void execute(Runnable command)
      Specified by:
      execute in interface Executor
      Overrides:
      execute in class heros.solver.CountingThreadPoolExecutor
    • awaitCompletion

      public void awaitCompletion() throws InterruptedException
      Overrides:
      awaitCompletion in class heros.solver.CountingThreadPoolExecutor
      Throws:
      InterruptedException
    • awaitCompletion

      public void awaitCompletion(long timeout, TimeUnit unit) throws InterruptedException
      Overrides:
      awaitCompletion in class heros.solver.CountingThreadPoolExecutor
      Throws:
      InterruptedException
    • isFinished

      public boolean isFinished()
      Gets whether this executor has terminated all of its tasks
      Returns:
      True if this executor has terminated all of its tasks, otherwise false
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface ExecutorService
      Overrides:
      isTerminated in class ThreadPoolExecutor