How Serialization Works with IGeodeSerializable
When your application puts an object into the cache for distribution, GemFire serializes the data by taking these steps.
- Calls the appropriate
ClassId
function and creates theTypeId
from it. - Writes the
TypeId
for the instance. - Invokes the
ToData
function for the instance.
When your application subsequently receives a byte array, GemFire takes the following steps:
- Decodes the
TypeId
and creates an object of the designated type, using the registered factory functions. - Invokes the
FromData
function with input from the data stream. - Decodes the data and then populates the data fields.
The TypeId
is an integer of four bytes, which is a combination of ClassId
integer and 0x27
, which is an indicator of user-defined type.