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 TypeMethodDescriptionvoid
add
(OsCmdRunner cmd) Add command to be executedvoid
add
(OsCmdRunner cmd, String outputFile) Add command to be executed, only if 'outputFile' does not existiterator()
void
kill()
Kill all commandsvoid
run()
Run commandsvoid
setNumThreads
(int numThreads) void
setRedirectToOutput
(boolean redirectToOutput) void
setVerbose
(boolean verbose) int
size()
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods 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:
iterator
in 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
-