Interface RecordDataSerializer
-
- All Known Implementing Classes:
RecordDataV1Serializer,RecordDataV2Serializer
public interface RecordDataSerializerInterface to provide size, read and write operations with WAL records without any headers and meta information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WALRecordreadRecord(WALRecord.RecordType type, ByteBufferBackedDataInput in, int size)Reads record data oftypefrom bufferin.intsize(WALRecord record)Calculates size of record data.voidwriteRecord(WALRecord record, ByteBuffer buf)Writes record data to bufferbuf.
-
-
-
Method Detail
-
size
int size(WALRecord record) throws IgniteCheckedException
Calculates size of record data.- Parameters:
record- WAL record.- Returns:
- Size of record in bytes.
- Throws:
IgniteCheckedException- If it's unable to calculate record data size.
-
readRecord
WALRecord readRecord(WALRecord.RecordType type, ByteBufferBackedDataInput in, int size) throws IOException, IgniteCheckedException
Reads record data oftypefrom bufferin.- Parameters:
type- Record type.in- Buffer to read.size- Record size (0 if unknown).- Returns:
- WAL record.
- Throws:
IOException- In case of I/O problems.IgniteCheckedException- If it's unable to read record.
-
writeRecord
void writeRecord(WALRecord record, ByteBuffer buf) throws IgniteCheckedException
Writes record data to bufferbuf.- Parameters:
record- WAL record.buf- Buffer to write.- Throws:
IgniteCheckedException- If it's unable to write record.
-
-