Package org.snpeff.osCmd
Class OsCmdQueue
java.lang.Object
org.snpeff.osCmd.OsCmdQueue
- All Implemented Interfaces:
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(OsCmdRunner cmd) Add command to be executedvoidadd(OsCmdRunner cmd, String outputFile) Add command to be executed, only if 'outputFile' does not existiterator()voidkill()Kill all commandsvoidrun()Run commandsvoidsetNumThreads(int numThreads) voidsetRedirectToOutput(boolean redirectToOutput) voidsetVerbose(boolean verbose) intsize()toString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
debug
public static boolean debug
-
-
Constructor Details
-
OsCmdQueue
public OsCmdQueue()
-
-
Method Details
-
add
Add command to be executed- Parameters:
cmd-
-
add
Add command to be executed, only if 'outputFile' does not exist- Parameters:
cmd-outputFile-
-
iterator
- Specified by:
iteratorin interfaceIterable<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
-