Interface Output.Stream

Enclosing interface:
Output

public static interface Output.Stream
One stream of an output: a format (the beginning of a batch, the records, its end) and the rules of a batch (when it is due). The bucket writes a segment per stream; a collector of logs may have one stream for all.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(Record record, long now)
    Formats a record into the open batch, opening one if needed; a batch that is full is sent.
    void
    Ends the open batch, if any, and sends it.
    boolean
    due(long now)
    Whether the open batch is due.
  • Method Details

    • append

      void append(Record record, long now)
      Formats a record into the open batch, opening one if needed; a batch that is full is sent.
      Parameters:
      record - the record
      now - the clock, ms
    • due

      boolean due(long now)
      Whether the open batch is due.
      Parameters:
      now - the clock, ms
      Returns:
      true to close it now
    • close

      void close()
      Ends the open batch, if any, and sends it.