picard.util

## Class FifoBuffer

- java.lang.Object
- - picard.cmdline.CommandLineProgram
  - - picard.util.FifoBuffer

-     public class FifoBuffer
      extends CommandLineProgram

  A program that is designed to act as a large memory buffer between processes that are connected with unix pipes where one or more processes either produce or consume their input or output in bursts. By inserting a large memory buffer between such processes each process can run at full speed and the bursts can be smoothed out. For example: java -jar SamToFastq.jar F=my.fastq INTERLEAVE=true | java -jar FifoBuffer | bwa mem -t 8 ...

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `BUFFER_SIZE`
    `int` | `DEBUG_FREQUENCY`
    `int` | `IO_SIZE`
    `String` | `NAME`

    - ### Fields inherited from class picard.cmdline.CommandLineProgram

      `COMPRESSION_LEVEL, CREATE_INDEX, CREATE_MD5_FILE, GA4GH_CLIENT_SECRETS, MAX_RECORDS_IN_RAM, QUIET, REFERENCE_SEQUENCE, TMP_DIR, VALIDATION_STRINGENCY, VERBOSITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `FifoBuffer()` Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.
    `FifoBuffer(InputStream in, PrintStream out)` Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected int` | `doWork()` Do the work after command line has been parsed.
    `static void` | `main(String[] args)`

    - ### Methods inherited from class picard.cmdline.CommandLineProgram

      `customCommandLineValidation, getCommandLine, getCommandLineParser, getDefaultHeaders, getMetricsFile, getNestedOptions, getNestedOptionsForHelp, getStandardUsagePreamble, getVersion, instanceMain, instanceMainWithExit, parseArgs, setDefaultHeaders`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### BUFFER_SIZE

          @Option(doc="The size of the memory buffer in bytes.")
          public int BUFFER_SIZE

    - #### IO_SIZE

          @Option(doc="The size, in bytes, to read/write atomically to the input and output streams.")
          public int IO_SIZE

    - #### DEBUG_FREQUENCY

          @Option(doc="How frequently, in seconds, to report debugging statistics. Set to zero for never.")
          public int DEBUG_FREQUENCY

    - #### NAME

          @Option(doc="Name to use for Fifo in debugging statements.",
                  optional=true)
          public String NAME

  - ### Constructor Detail

    - #### FifoBuffer

          public FifoBuffer(InputStream in,
                            PrintStream out)

      Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.

    - #### FifoBuffer

          public FifoBuffer()

      Constructor that defaults to QUIET since Fifos don't do anything beyond buffering having their start/end information logged is often undesirable.

  - ### Method Detail

    - #### main

          public static void main(String[] args)

    - #### doWork

          protected int doWork()

      Description copied from class: `CommandLineProgram`
      Do the work after command line has been parsed. RuntimeException may be thrown by this method, and are reported appropriately.
      Specified by:
        `doWork` in class `CommandLineProgram`
      Returns:
        program exit status.