Interface RecordIO
-
public interface RecordIOInternal interface to provide size, read and write operations of WAL records including record header and data.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description WALRecordreadWithHeaders(ByteBufferBackedDataInput in, WALPointer expPtr)Reads record data with headers fromin.intsizeWithHeaders(WALRecord record)Calculates and returns size of record data and headers.voidwriteWithHeaders(WALRecord record, ByteBuffer buf)Writes record data with headers tobuf.
-
-
-
Method Detail
-
sizeWithHeaders
int sizeWithHeaders(WALRecord record) throws IgniteCheckedException
Calculates and returns size of record data and headers.- Parameters:
record- WAL record.- Returns:
- Size in bytes.
- Throws:
IgniteCheckedException- If it's unable to calculate size of record.
-
readWithHeaders
WALRecord readWithHeaders(ByteBufferBackedDataInput in, WALPointer expPtr) throws IOException, IgniteCheckedException
Reads record data with headers fromin.- Parameters:
in- Buffer to read.expPtr- Expected WAL pointer for record. Used to validate actual position against expected from the file.- Returns:
- WAL record.
- Throws:
IOException- In case of I/O problems.IgniteCheckedException- If it's unable to read record.
-
writeWithHeaders
void writeWithHeaders(WALRecord record, ByteBuffer buf) throws IgniteCheckedException
Writes record data with headers tobuf.- Parameters:
record- WAL record.buf- Buffer to write.- Throws:
IgniteCheckedException- If it's unable to write record.
-
-