Serialize Using the GemFire IPdxSerializable Interface

Serialize Using the GemFire IPdxSerializable Interface

Use this procedure to program your domain object for PDX
serialization using the IPdxSerializable Interface.
When you write objects using PDX serialization, they are distributed to
the server tier in PDX serialized form. When you run queries against the
objects on the servers, only the fields you specify are deserialized.

Call the
ToData markIdentifyField
function for each field GemFire should use to
identify your object. This is used to compare
objects for operations like
DISTINCT queries. The
markIdentifyField call must
come after the associated field write methods.

Program
IPdxSerializable FromData to read your
data fields from the serialized form into the object's
fields using the IPdxReader read methods.
GemFire automatically provides IPdxReader
to the FromData function for
IPdxSerializable objects.

Use the
same names as you did in ToData and
call the read operations in the same order as you called
the write operations in your ToData
implementation.