Package com.hazelcast.nio.serialization
Interface Portable
- All Known Subinterfaces:
VersionedPortable
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.
-
Method Summary
Modifier and TypeMethodDescriptionint
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 classvoid
readPortable
(PortableReader reader) Deprecated, for removal: This API element is subject to removal in a future version.Read portable fields using PortableReadervoid
writePortable
(PortableWriter writer) 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
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
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
-