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

## Interface RecordSerializerFactory

All Known Implementing Classes:
  RecordSerializerFactoryImpl

    public interface RecordSerializerFactory

Factory for creating `RecordSerializer`.

### Method Summary

All Methods Instance Methods Abstract Methods
`RecordSerializer` `createSerializer(int ver)` Factory method for creation `RecordSerializer`.
`RecordSerializerFactory` `marshalledMode(boolean marshalledMode)` If marshalledMode is on, created serializer will read `MarshalledRecord` with raw binary data instead of actual record.
`RecordSerializerFactory` `recordDeserializeFilter(IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)` Specifies deserialization filter.
`RecordSerializerFactory` `skipPositionCheck(boolean skipPositionCheck)` If skipPositionCheck is true, created serializer won't check that actual position of record in file is equal to position in saved record's WALPointer.
`RecordSerializerFactory` `writePointer(boolean writePointer)` TODO: This flag was added under IGNITE-6029, but still unused.

### Method Detail

#### createSerializer

    RecordSerializer createSerializer(int ver)
                               throws IgniteCheckedException

Factory method for creation `RecordSerializer`.

Parameters:
  `ver` - Serializer version.
Returns:
  record serializer.
Throws:
  `IgniteCheckedException`

#### writePointer

    RecordSerializerFactory writePointer(boolean writePointer)

TODO: This flag was added under IGNITE-6029, but still unused. Should be either handled or removed.

Parameters:
  `writePointer` - Write pointer flag.

#### recordDeserializeFilter

    RecordSerializerFactory recordDeserializeFilter(IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)

Specifies deserialization filter. Created serializer will read bulk `FilteredRecord` instead of actual record if record type/pointer doesn't satisfy filter.

Parameters:
  `readTypeFilter` - Read type filter.

#### marshalledMode

    RecordSerializerFactory marshalledMode(boolean marshalledMode)

If marshalledMode is on, created serializer will read `MarshalledRecord` with raw binary data instead of actual record. Useful for copying binary data from WAL.

Parameters:
  `marshalledMode` - Marshalled mode.

#### skipPositionCheck

    RecordSerializerFactory skipPositionCheck(boolean skipPositionCheck)

If skipPositionCheck is true, created serializer won't check that actual position of record in file is equal to position in saved record's WALPointer. Must be true if we are reading from compacted WAL segment.

Parameters:
  `skipPositionCheck` - Skip position check.

2018 Copyright © Apache Software Foundation

Follow @ApacheIgnite

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