Class OsCmdQueue

java.lang.Object
org.snpeff.osCmd.OsCmdQueue
All Implemented Interfaces:
Iterable<OsCmdRunner>

public class OsCmdQueue extends Object implements Iterable<OsCmdRunner>
A queue of commands to be run. They are run in multiple threads (default number of threads = number of CPUs in the computer)
Author:
pcingola
  • Field Details

    • debug

      public static boolean debug
  • Constructor Details

    • OsCmdQueue

      public OsCmdQueue()
  • Method Details

    • add

      public void add(OsCmdRunner cmd)
      Add command to be executed
      Parameters:
      cmd -
    • add

      public void add(OsCmdRunner cmd, String outputFile)
      Add command to be executed, only if 'outputFile' does not exist
      Parameters:
      cmd -
      outputFile -
    • iterator

      public Iterator<OsCmdRunner> iterator()
      Specified by:
      iterator in interface Iterable<OsCmdRunner>
    • kill

      public void kill()
      Kill all commands
    • run

      public void run()
      Run commands
    • setNumThreads

      public void setNumThreads(int numThreads)
    • setRedirectToOutput

      public void setRedirectToOutput(boolean redirectToOutput)
    • setVerbose

      public void setVerbose(boolean verbose)
    • size

      public int size()
    • toString

      public String toString()
      Overrides:
      toString in class Object