Class BinaryRecordV2

java.lang.Object
com.illumon.iris.binarystore.BinaryRecordV2
All Implemented Interfaces:
Record

public class BinaryRecordV2 extends Object implements Record
This class implements binary record entry writing for the V2 binary log format. The binary store v2 format supports record entries. This class encapsulates the payload of such a record.
Format of a V2 binary Record (as distinct from a Row) is:
  1. Size (int) - per v2 binary format
  2. Row Flags (byte) - per v2 binary format
  3. record data:
    1. record type (int)
    2. version (int)
    3. any additional data for the record type
  4. checksum (int) - per v2 binary format
Format for a Command record is:
  1. command id (int)
  2. optional additional data
  • Field Details

  • Constructor Details

  • Method Details

    • getRecordSetter

      public <T extends RecordData> Record.RecordSetter<T> getRecordSetter(Class<T> tClass)
      Description copied from interface: Record
      Gets a typed record setter for an entry.
      Specified by:
      getRecordSetter in interface Record
      Returns:
      setter for the record.
    • setRecordData

      public void setRecordData(RecordData recordData)
      Set record data using the default/primary record writer.
      Parameters:
      recordData - the data to set
    • writeRecord

      public void writeRecord(WritableByteChannel channel) throws IOException
      Description copied from interface: Record
      Write a record entry to the provided output channel. The implementor is responsible for providing the data buffer.
      Specified by:
      writeRecord in interface Record
      Throws:
      IOException
    • populateBuffer

      public static void populateBuffer(ByteBuffer theBuffer, RecordData recordData)
      Populate the given buffer with all the record data and all surrounding v2 binary row requirements.
      Parameters:
      theBuffer - populate this buffer
      recordData - The data payload