Interface ObjectSerializer<T>

Type Parameters:
T - type of object to serialize.
All Superinterfaces:
Serializable
All Known Implementing Classes:
JavaObjectSerializer

public interface ObjectSerializer<T> extends Serializable
Implementations of this interface are used to customize how objects will be stored when the index is persisted
  • Method Summary

    Modifier and Type
    Method
    Description
    Reads an item from an ObjectOutput implementation.
    void
    write(T item, ObjectOutput out)
    Writes the item to an ObjectOutput implementation.
  • Method Details

    • write

      void write(T item, ObjectOutput out) throws IOException
      Writes the item to an ObjectOutput implementation.
      Parameters:
      item - the item to write
      out - the ObjectOutput implementation to write to
      Throws:
      IOException - in case of an I/O exception
    • read

      Reads an item from an ObjectOutput implementation.
      Parameters:
      in - the ObjectInput implementation to read from
      Returns:
      the read item
      Throws:
      IOException - in case of an I/O exception
      ClassNotFoundException - in case the value read does not match the type of item