Interface BinaryStoreBufferProcessor

All Superinterfaces:
BinaryStoreReader, TableReader
All Known Implementing Classes:
BinaryStoreBufferProcessorV1, BinaryStoreBufferProcessorV2, DelegatingBinaryStoreV2BufferProcessor

public interface BinaryStoreBufferProcessor extends TableReader, BinaryStoreReader
Interface for BinaryStoreImportProcessor to access both V1 and V2 BinaryStores.
  • Method Details

    • setDataBuffer

      void setDataBuffer(ByteBuffer buffer, long sentTimestamp, long recvTimestamp)
      The BinaryStoreBufferProcessors do not read their own data, but rather receive it externally through this call.
      Parameters:
      buffer - The buffer that this BinaryStoreBufferProcessor should consume data from.
      sentTimestamp - The time the buffer was produced, in microseconds from the epoch, or QueryConstants.NULL_LONG if unknown/unavailable
      recvTimestamp - The timestamp when the buffer was received, in microseconds from the epoch
      ImplNote:
      Implementations may choose to not use the send and receive timestamps.
    • setRowHandler

      Runnable setRowHandler(Runnable rowHandler)
      Set a row handler callback for this buffer processor. Not supported for delegating buffer processors.
      Parameters:
      rowHandler - The replacement row handler
      Returns:
      The previous row handler
    • setRecordHandler

      Runnable setRecordHandler(Runnable recordHandler)
      Set a record handler callback for this buffer processor.
      Parameters:
      recordHandler - The replacement record handler
      Returns:
      The previous record handler
    • delegatesRowBufferProcessing

      default boolean delegatesRowBufferProcessing()
      Check if this buffer processor delegates row buffer processing to a BinaryStoreV2RowBufferProcessor.

      Delegating buffer processors do not support the following methods:

      Delegating buffer processors are the only ones that support the following methods:
      Returns:
      True of this buffer processor delegates row buffer processing
    • getHeaderInfo

      default BinaryStoreV2HeaderInfo getHeaderInfo()
      Get information extracted from the last binary store header read. Only supported for delegating buffer processors.
      Returns:
      The header information
    • setRowBufferProcessor

      default BinaryStoreV2RowBufferProcessor setRowBufferProcessor(@NotNull BinaryStoreV2RowBufferProcessor rowBufferProcessor)
      Set the BinaryStoreV2RowBufferProcessor that will be used to parse and process all row entries. Only supported for delegating buffer processors.
      Parameters:
      rowBufferProcessor - The new BinaryStoreV2RowBufferProcessor
      Returns:
      The previous BinaryStoreV2RowBufferProcessor, or null if none was set
    • isDirty

      default boolean isDirty()
      Does this buffer processor contain inconsistent state that should prevent checkpointing?
      Returns:
      Whether this buffer processor contains inconsistent state that should prevent checkpointing