Module io.xpipe.api
Package io.xpipe.api

Interface DataTableAccumulator

All Known Implementing Classes:
DataTableAccumulatorImpl

public interface DataTableAccumulator
An accumulator for table data.

This class can be used to construct new table data sources by accumulating the rows using add(DataStructureNode) or acceptor() and then calling finish(DataStoreId) to complete the construction process and create a new data source.

  • Method Summary

    Modifier and Type
    Method
    Description
    io.xpipe.core.data.node.DataStructureNodeAcceptor<io.xpipe.core.data.node.DataStructureNode>
    Creates a tuple acceptor that adds all accepted tuples to the table.
    void
    add(io.xpipe.core.data.node.DataStructureNode row)
    Adds a row to the table.
    create(io.xpipe.core.data.type.TupleType type)
     
    finish(io.xpipe.core.source.DataStoreId id)
    Finishes the construction process and returns the data source reference.
    default DataTable
    Wrapper for finish(DataStoreId).
    int
    Returns the current amount of rows added to the table.
  • Method Details

    • create

      static DataTableAccumulator create(io.xpipe.core.data.type.TupleType type)
    • finish

      default DataTable finish(String id)
      Wrapper for finish(DataStoreId).
    • finish

      DataTable finish(io.xpipe.core.source.DataStoreId id)
      Finishes the construction process and returns the data source reference.
      Parameters:
      id - the data source id to assign
    • add

      void add(io.xpipe.core.data.node.DataStructureNode row)
      Adds a row to the table.
      Parameters:
      row - the row to add
    • acceptor

      io.xpipe.core.data.node.DataStructureNodeAcceptor<io.xpipe.core.data.node.DataStructureNode> acceptor()
      Creates a tuple acceptor that adds all accepted tuples to the table.
    • getCurrentRows

      int getCurrentRows()
      Returns the current amount of rows added to the table.