How Delta Propagation Works
GemFire propagates object deltas using methods that you program on the client side. The methods are in the delta interface, which you implement in your cached objects’ classes.
This figure shows delta propagation for a change to an entry with key,
k, and value object,
- get operation. The
getworks as usual; the cache returns the full entry object from the local cache or, if it is unavailable there, from a server cache or from a loader.
- update methods. You need to add code to the object’s update methods so that they save delta information for object updates, in addition to the work they were already doing.
- put operation. The
putworks as usual in the local cache, using the full value, then calls
hasDeltato check for deltas and
toDeltato serialize the information.
- receipt of delta.
fromDeltaextracts the delta information that was serialized by
toDeltaand applies it to the object in the local cache. The delta is applied directly to the existing value or to a clone, depending on how you configure it for the region.
- additional distributions. As with full distributions, receiving members forward the delta according to their configurations and connections to other members. In the example, the server would forward the delta to its peers and its other clients as needed. Receiving members do not recreate the delta;
toDeltais only called in the originating member.