Interface RecordSerializer
-
- All Known Implementing Classes:
RecordV1Serializer,RecordV2Serializer
public interface RecordSerializerRecord serializer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WALRecordreadRecord(FileInput in, WALPointer expPtr)Loads record from inputintsize(WALRecord record)Calculates record size in byte including expected wal pointer, CRC and type fieldintversion()booleanwritePointer()Flag to write (or not) wal pointer to recordvoidwriteRecord(WALRecord record, ByteBuffer buf)
-
-
-
Method Detail
-
version
int version()
- Returns:
- serializer version
-
size
int size(WALRecord record) throws IgniteCheckedException
Calculates record size in byte including expected wal pointer, CRC and type field- Parameters:
record- Record.- Returns:
- Size in bytes.
- Throws:
IgniteCheckedException
-
writeRecord
void writeRecord(WALRecord record, ByteBuffer buf) throws IgniteCheckedException
- Parameters:
record- Entry to write.buf- Buffer.- Throws:
IgniteCheckedException
-
readRecord
WALRecord readRecord(FileInput in, WALPointer expPtr) throws IOException, IgniteCheckedException
Loads record from input- Parameters:
in- Data input to read data from.expPtr- expected WAL pointer for record. Used to validate actual position against expected from the file- Returns:
- Read entry.
- Throws:
IOExceptionIgniteCheckedException
-
writePointer
boolean writePointer()
Flag to write (or not) wal pointer to record
-
-