Class RecordSerializerFactoryImpl
- java.lang.Object
-
- org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactoryImpl
-
- All Implemented Interfaces:
RecordSerializerFactory
public class RecordSerializerFactoryImpl extends Object implements RecordSerializerFactory
-
-
Field Summary
-
Fields inherited from interface org.apache.ignite.internal.processors.cache.persistence.wal.serializer.RecordSerializerFactory
LATEST_SERIALIZER_VERSION
-
-
Constructor Summary
Constructors Constructor Description RecordSerializerFactoryImpl(GridCacheSharedContext cctx)RecordSerializerFactoryImpl(GridCacheSharedContext cctx, @Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RecordSerializercreateSerializer(int ver)Factory method for creationRecordSerializer.booleanmarshalledMode()RecordSerializerFactoryImplmarshalledMode(boolean marshalledMode)If marshalledMode is on, created serializer will readMarshalledRecordwith raw binary data instead of actual record.IgniteBiPredicate<WALRecord.RecordType,WALPointer>recordDeserializeFilter()RecordSerializerFactoryImplrecordDeserializeFilter(@Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)Specifies deserialization filter.booleanskipPositionCheck()RecordSerializerFactoryImplskipPositionCheck(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'sWALPointer.booleanwritePointer()RecordSerializerFactoryImplwritePointer(boolean writePointer)TODO: This flag was added under IGNITE-6029, but still unused.
-
-
-
Constructor Detail
-
RecordSerializerFactoryImpl
public RecordSerializerFactoryImpl(GridCacheSharedContext cctx)
- Parameters:
cctx- Cctx.
-
RecordSerializerFactoryImpl
public RecordSerializerFactoryImpl(GridCacheSharedContext cctx, @Nullable @Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)
- Parameters:
cctx- Cctx.
-
-
Method Detail
-
createSerializer
public RecordSerializer createSerializer(int ver) throws IgniteCheckedException
Factory method for creationRecordSerializer.- Specified by:
createSerializerin interfaceRecordSerializerFactory- Parameters:
ver- Serializer version.- Returns:
- record serializer.
- Throws:
IgniteCheckedException
-
writePointer
public boolean writePointer()
- Returns:
- Write pointer.
-
writePointer
public RecordSerializerFactoryImpl writePointer(boolean writePointer)
TODO: This flag was added under IGNITE-6029, but still unused. Should be either handled or removed.- Specified by:
writePointerin interfaceRecordSerializerFactory- Parameters:
writePointer- Write pointer flag.
-
recordDeserializeFilter
public IgniteBiPredicate<WALRecord.RecordType,WALPointer> recordDeserializeFilter()
- Returns:
- Read type filter.
-
recordDeserializeFilter
public RecordSerializerFactoryImpl recordDeserializeFilter(@Nullable @Nullable IgniteBiPredicate<WALRecord.RecordType,WALPointer> readTypeFilter)
Specifies deserialization filter. Created serializer will read bulkFilteredRecordinstead of actual record if record type/pointer doesn't satisfy filter.- Specified by:
recordDeserializeFilterin interfaceRecordSerializerFactory- Parameters:
readTypeFilter- Read type filter.
-
marshalledMode
public boolean marshalledMode()
- Returns:
- Marshalled mode. Records are not deserialized in this mode, with binary representation are read instead.
-
marshalledMode
public RecordSerializerFactoryImpl marshalledMode(boolean marshalledMode)
If marshalledMode is on, created serializer will readMarshalledRecordwith raw binary data instead of actual record. Useful for copying binary data from WAL.- Specified by:
marshalledModein interfaceRecordSerializerFactory- Parameters:
marshalledMode- Marshalled mode.
-
skipPositionCheck
public boolean skipPositionCheck()
- Returns:
- Skip position check flag. Should be set for reading compacted wal file with skipped physical records.
-
skipPositionCheck
public RecordSerializerFactoryImpl 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'sWALPointer. Must be true if we are reading from compacted WAL segment.- Specified by:
skipPositionCheckin interfaceRecordSerializerFactory- Parameters:
skipPositionCheck- Skip position check.
-
-