Interface DataSink

All Known Implementing Classes:
AbstractXYSeriesDataSink, BatchParamMapFileWriter, ConsoleDataSink, DataServer, FileDataSink, HistogramDataSink, XYDataSinkSourceSeries, XYDataSinkValueSeries

public interface DataSink
Interface for classes that can retrieve data from a DataSet. DataSink supports grouping appended data into "rows" via the rowStarted() and rowEnded() methods.
Author:
Nick Collier
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    append(String key, Object value)
    Appends the specified data to this sink.
    void
    Close this DataSink.
    void
    Flushes any data buffered by this DataSink.
    void
    open(List<String> sourceIds)
    Open this DataSink.
    void
    Notified this DataSink that the current record has ended.
    void
    Notifies this DataSink that the last append was end of a "row."
    void
    Notifies this DataSink that the next append is that start of a "row." of data.
  • Method Details

    • open

      void open(List<String> sourceIds)
      Open this DataSink.
      Parameters:
      sourceIds - a list of the DataSource ids for which this is the sink.
      Throws:
      DataException - if there is an error opening the sink.
    • rowStarted

      void rowStarted()
      Notifies this DataSink that the next append is that start of a "row." of data.
    • append

      void append(String key, Object value)
      Appends the specified data to this sink. The key can be, for example, a column name and the value the current value for that column.
      Parameters:
      key - the data's key
      value - the data's value
    • rowEnded

      void rowEnded()
      Notifies this DataSink that the last append was end of a "row."
    • recordEnded

      void recordEnded()
      Notified this DataSink that the current record has ended.
    • flush

      void flush()
      Flushes any data buffered by this DataSink.
    • close

      void close()
      Close this DataSink.