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 Type
    Method
    Description
    Deserialize the contents of T 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

      T deserialize(DataInput in) throws IOException
      Deserialize the contents of T 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 by serialize(DataOutput, T). The properties are read using DataInput and ExternalizableHelper 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

      void serialize(DataOutput out, T value) throws IOException
      Serialize a user type instance by storing its properties into the passed DataOutput object. The instance's properties are written using DataOutput and ExternalizableHelper write methods.
      Parameters:
      out - the DataOutput stream to write the state of this object to
      value - the object to serialize
      Throws:
      IOException - if an I/O exception occurs