|Developing with Pivotal GemFire / Delta Propagation|
This topic describes the properties that can be used to configure delta propagation.
Delta propagation properties can be configured through the API and through the gemfire.properties and cache.xml files.
A gemfire.properties boolean that enables or disables delta propagation. When false, full entry values are sent for every update. The default setting is true, which enables delta propagation.
Properties props = new Properties(); props.setProperty("delta-propagation", false); this.cache = new ClientCacheFactory(props).create();
A region attributes boolean that affects how fromDelta applies deltas to the local cache. When true, the updates are applied to a clone of the value and then the clone is saved to the cache. When false, the value is modified in place in the cache. The default value is false.
Cloning can be expensive, but it ensures that the new object is fully initialized with the delta before any application code sees it.
When cloning is enabled, by default GemFire does a deep copy of the object, using serialization. You may be able to improve performance by implementing java.lang.Cloneable and then implementing the clone method, making a deep copy of anything to which a delta may be applied. The goal is to reduce significantly the overhead of copying the object while still retaining the isolation needed for your deltas.
<region name="region_with_cloning"> <region-attributes refid="REPLICATE" cloning-enabled="true"> </region-attributes> </region>
RegionFactory rf = cache.createRegionFactory(REPLICATE); rf.setCloningEnabled(true); custRegion = rf.create("customer");