Package com.illumon.iris.binarystore
Class BinaryRecordV2
java.lang.Object
com.illumon.iris.binarystore.BinaryRecordV2
- All Implemented Interfaces:
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:
Format of a V2 binary Record (as distinct from a Row) is:
- Size (int) - per v2 binary format
- Row Flags (byte) - per v2 binary format
- record data:
- record type (int)
- version (int)
- any additional data for the record type
- checksum (int) - per v2 binary format
- command id (int)
- optional additional data
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classNested classes/interfaces inherited from interface com.illumon.iris.binarystore.Record
Record.RecordSetter<T extends RecordData> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected ByteBufferprotected RowSetter<RecordData>protected final BinaryStoreWriterV2 -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends RecordData>
Record.RecordSetter<T>getRecordSetter(Class<T> tClass) Gets a typed record setter for an entry.static voidpopulateBuffer(ByteBuffer theBuffer, RecordData recordData) Populate the given buffer with all the record data and all surrounding v2 binary row requirements.voidsetRecordData(RecordData recordData) Set record data using the default/primary record writer.voidwriteRecord(WritableByteChannel channel) Write a record entry to the provided output channel.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.Record
getRecordSetter
-
Field Details
-
writer
-
dataBuffer
-
recordSetter
-
-
Constructor Details
-
BinaryRecordV2
-
-
Method Details
-
getRecordSetter
Description copied from interface:RecordGets a typed record setter for an entry.- Specified by:
getRecordSetterin interfaceRecord- Returns:
- setter for the record.
-
setRecordData
Set record data using the default/primary record writer.- Parameters:
recordData- the data to set
-
writeRecord
Description copied from interface:RecordWrite a record entry to the provided output channel. The implementor is responsible for providing the data buffer.- Specified by:
writeRecordin interfaceRecord- Throws:
IOException
-
populateBuffer
Populate the given buffer with all the record data and all surrounding v2 binary row requirements.- Parameters:
theBuffer- populate this bufferrecordData- The data payload
-