org.apache.ignite.internal.processors.cache.persistence.wal.serializer

## Interface RecordDataSerializer

All Known Implementing Classes:
  RecordDataV1Serializer, RecordDataV2Serializer

    public interface RecordDataSerializer

Interface to provide size, read and write operations with WAL records without any headers and meta information.

### Method Summary

All Methods Instance Methods Abstract Methods
`WALRecord` `readRecord(WALRecord.RecordType type, ByteBufferBackedDataInput in, int size)` Reads record data of `type` from buffer `in`.
`int` `size(WALRecord record)` Calculates size of record data.
`void` `writeRecord(WALRecord record, ByteBuffer buf)` Writes record data to buffer `buf`.

### 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 of `type` from buffer `in`.

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 buffer `buf`.

Parameters:
  `record` - WAL record.
  `buf` - Buffer to write.
Throws:
  `IgniteCheckedException` - If it's unable to write record.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.1
Release Date | : December 9 2020