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

## Interface RecordSerializer

All Known Implementing Classes:
  RecordV1Serializer, RecordV2Serializer

    public interface RecordSerializer

Record serializer.

### Method Summary

All Methods Instance Methods Abstract Methods
`WALRecord` `readRecord(FileInput in, WALPointer expPtr)` Loads record from input
`int` `size(WALRecord record)` Calculates record size in byte including expected wal pointer, CRC and type field
`int` `version()`
`boolean` `writePointer()` Flag to write (or not) wal pointer to record
`void` `writeRecord(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:
  `IOException`
  `IgniteCheckedException`

#### writePointer

    boolean writePointer()

Flag to write (or not) wal pointer to record

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Fabric | : ver. 2.4.0
Release Date | : March 5 2018