blob: 4f9bbf49ee01c63149bda4868a561366ec6f2566 [file] [log] [blame]
---
title: Using PDX Serialization with Delta Propagation
---
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<a id="concept_F33AC930A8F14F0A9EE07AC31FFD8C8F__section_6C08121D7A034993A7422985FBC9A0D9"></a>
You can include delta propagation support with PDX serialization by implementing the `Delta` interface methods.
However, using delta propagation with PDX will require 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.
``` pre
class PdxWithDelta : public PdxSerializable, public Delta
{
public:
bool hasDelta();
void toDelta(DataOutput& output);
void fromDelta(DataInput& input);
DeltaPtr clone();
// other PdxSerializable methods here...
};
```