Interface BinaryStoreV2RowBufferProcessor

All Known Implementing Classes:
BatchedImportRowBufferProcessor, BinaryStoreV2RowBufferProcessor.Uninitialized

public interface BinaryStoreV2RowBufferProcessor
Interface for row buffer processors, which are usually generated code to fill and write a row batch data structure.
  • Method Details

    • setDataBuffer

      void setDataBuffer(@NotNull ByteBuffer dataBuffer, long txTimestamp, long rxTimestamp)
      Advise this buffer processor of the incoming data buffer and its associated timestamps to be used in subsequent calls to processRow(Row.Flags, int). This buffer processor should record this information, and may need to clear cached objects (e.g. duplicate buffers) linked to the buffer.
      Parameters:
      dataBuffer - The data buffer
      txTimestamp - The transmit timestamp from the source
      rxTimestamp - The receive timestamp at this destination
    • processRow

      void processRow(@NotNull Row.Flags flags, int rowSize) throws IOException
      Process a binary row entry. Data is guaranteed to be complete and to have passed checksum verification if such verification is enabled. The data buffer will be positioned to begin reading variable columns.

      Implementations may internally "defer" part or all of this processing until a later time, for example in order to batch transformation or columnar writing tasks. They may assume that doDeferredProcessing() will be called before the contents of the current data buffer are mutated.

      Parameters:
      flags - The flags for this row
      Throws:
      IOException
    • doDeferredProcessing

      void doDeferredProcessing() throws IOException
      Do any row processing previously deferred by this implementation's processRow(Row.Flags, int).

      This must be invoked explicitly:

      • before changing the contents of the current data buffer
      • before processing a record
      Row buffer processors are internally responsible for making sure deferred processing results in correct operation, e.g. starting/ending transactions as appropriate and respecting internal capacity restrictions.
      Throws:
      IOException
    • isDirty

      boolean isDirty()
      Check whether this buffer processor has any deferred row data to process via doDeferredProcessing().
      Returns:
      Whether this buffer processor has any deferred row data to process