Interface Portable

All Known Subinterfaces:
VersionedPortable

@Deprecated(since="5.4", forRemoval=true) public interface Portable
Deprecated, for removal: This API element is subject to removal in a future version.
Portable Serialization has been deprecated. We recommend you use Compact Serialization as Portable Serialization will be removed as of version 7.0.
Portable provides an alternative serialization method. Instead of relying on reflection, each Portable is created by a registered PortableFactory.

Portable serialization has the following advantages:

  • Support multiple versions of the same object type. (See SerializationConfig.setPortableVersion(int))
  • Fetching individual fields without having to rely on reflection.
  • Querying and indexing support without de-serialization and/or reflection.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns class identifier for this portable class.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Returns PortableFactory ID for this portable class
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Read portable fields using PortableReader
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Serialize this portable object using PortableWriter
  • Method Details

    • getFactoryId

      int getFactoryId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns PortableFactory ID for this portable class
      Returns:
      factory ID
    • getClassId

      int getClassId()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns class identifier for this portable class. Class ID should be unique per PortableFactory.
      Returns:
      class ID
    • writePortable

      void writePortable(PortableWriter writer) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Serialize this portable object using PortableWriter
      Parameters:
      writer - PortableWriter
      Throws:
      IOException - in case of any exceptional case
    • readPortable

      void readPortable(PortableReader reader) throws IOException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Read portable fields using PortableReader
      Parameters:
      reader - PortableReader
      Throws:
      IOException - in case of any exceptional case