Interface FrameColumnWriter

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
ComplexFrameColumnWriter, DoubleArrayFrameColumnWriter, DoubleFrameColumnWriter, FloatArrayFrameColumnWriter, FloatFrameColumnWriter, LongArrayFrameColumnWriter, LongFrameColumnWriter, NumericArrayFrameColumnWriter, StringFrameColumnWriter

public interface FrameColumnWriter extends Closeable
Represent writers for the columnar frames. The class objects must be provided with information on what values to write, usually provided as a ColumnValueSelector and where to write to, usually temporary growable memory addSelection() will be called repeatedly, as the current value to write gets updated. For the final write, call writeTo(org.apache.datasketches.memory.WritableMemory, long), which will copy the values we have added so far to the destination memory.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Adds the current value to the writer
    void
     
    long
    Size (in bytes) of the column data that will get written when writeTo(org.apache.datasketches.memory.WritableMemory, long) will be called
    void
    Reverts the last added value.
    long
    writeTo(org.apache.datasketches.memory.WritableMemory memory, long position)
    Writes the value of the column to the provided memory at the given position
  • Method Details

    • addSelection

      boolean addSelection()
      Adds the current value to the writer
    • undo

      void undo()
      Reverts the last added value. Undo calls cannot be called in successsion
    • size

      long size()
      Size (in bytes) of the column data that will get written when writeTo(org.apache.datasketches.memory.WritableMemory, long) will be called
    • writeTo

      long writeTo(org.apache.datasketches.memory.WritableMemory memory, long position)
      Writes the value of the column to the provided memory at the given position
    • close

      void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable