Package org.apache.ignite.binary
Interface BinarySerializer
-
- All Known Implementing Classes:
BinaryReflectiveSerializer
public interface BinarySerializer
Interface that allows to implement custom serialization logic for binary objects. Can be used instead ofBinarylizable
in case if the class cannot be changed directly.Binary serializer can be configured for all binary objects via
BinaryConfiguration.getSerializer()
method, or for a specific binary type viaBinaryTypeConfiguration.getSerializer()
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
readBinary(Object obj, BinaryReader reader)
Reads fields from provided reader.void
writeBinary(Object obj, BinaryWriter writer)
Writes fields to provided writer.
-
-
-
Method Detail
-
writeBinary
void writeBinary(Object obj, BinaryWriter writer) throws BinaryObjectException
Writes fields to provided writer.- Parameters:
obj
- Empty object.writer
- Binary object writer.- Throws:
BinaryObjectException
- In case of error.
-
readBinary
void readBinary(Object obj, BinaryReader reader) throws BinaryObjectException
Reads fields from provided reader.- Parameters:
obj
- Empty objectreader
- Binary object reader.- Throws:
BinaryObjectException
- In case of error.
-
-