Package com.tangosol.io
Interface ExternalizableLiteSerializer<T>
- Type Parameters:
T
- the type of the object used by this serializer
public interface ExternalizableLiteSerializer<T>
The ExternalizableLiteSerializer interface provides the capability of reading and writing a
Java object from and to a DataInput/DataOutput stream.
Note: it is extremely important that objects that are equivalent according to their "equals()" implementation produce equivalent serialized streams. Violating this relationship will result in non-deterministic behavior for many Coherence services.
- Since:
- 23.09
- Author:
- jf 2023.06.05
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondeserialize
(DataInput in) Deserialize the contents ofT
instance by loading the object's state from the passed DataInput object.void
serialize
(DataOutput out, T value) Serialize a user type instance by storing its properties into the passed DataOutput object.
-
Method Details
-
deserialize
Deserialize the contents ofT
instance by loading the object's state from the passed DataInput object. The instance's properties must be read in the same order as written byserialize(DataOutput, T)
. The properties are read usingDataInput
andExternalizableHelper
read methods.- Parameters:
in
- the DataInput stream to read data from in order to restore the state of this object- Returns:
- the deserialized user type instance
- Throws:
IOException
- if an I/O error occurs
-
serialize
Serialize a user type instance by storing its properties into the passed DataOutput object. The instance's properties are written usingDataOutput
andExternalizableHelper
write methods.- Parameters:
out
- the DataOutput stream to write the state of this object tovalue
- the object to serialize- Throws:
IOException
- if an I/O exception occurs
-