Pivotal GemFire® Native Client v9.0

Using PDX Serialization with Delta Propagation

You can include delta propagation support with PDX serialization by implementing the Delta interface methods. However, using delta propagation with PDX will requires that you implement Java side classes. The objects will remain in deserialized form at all times on the server and you will lose one of the main benefits of PDX.

In addition, you must set read-serialized to false. Otherwise, Java objects will be deserialized to instances of PdxInstance, which never implements deltas.

The following code snippet is a sample implementation of the Delta interface methods for using with PDX serialization.

class PdxWithDelta : public PdxSerializable, public Delta

  bool hasDelta();
  void toDelta(DataOutput& output);
  void fromDelta(DataInput& input);
  DeltaPtr clone();

// other PdxSerializable methods here...