To use delta propagation, an application class must derive from class Delta as well as class Cacheable publicly. The methods hasDelta( ), toDelta( ) and fromDelta( ) must be implemented by the class, as these methods are used by GemFire to detect the presence of delta in an object, to serialize the delta, and to apply a serialized delta to an existing object of the class.
Public Member Functions | |
| virtual DeltaPtr | clone () |
| Creates a copy of the object on which delta is to be applied via notification. | |
| virtual void | fromDelta (DataInput &in)=0 |
| Reads in delta information to this object in a user-defined format. | |
| virtual bool | hasDelta ()=0 |
hasDelta( ) is invoked by GemFire during Region::put( CacheableKeyPtr, CacheablePtr ) to determine if the object contains a delta. | |
| virtual void | toDelta (DataOutput &out) const =0 |
| Writes out delta information to out in a user-defined format. | |
| virtual DeltaPtr gemfire::Delta::clone | ( | ) | [virtual] |
Creates a copy of the object on which delta is to be applied via notification.
The region attribute for cloning must be set to 'true' in order to enable cloning. The default implementation of this method creates an object clone by first serializing the object into a buffer, then deserializing from the buffer thus creating a clone of the original.
| virtual void gemfire::Delta::fromDelta | ( | DataInput & | in | ) | [pure virtual] |
Reads in delta information to this object in a user-defined format.
This is invoked on an existing application object after GemFire determines the presence of delta in DataInput instance.
| virtual bool gemfire::Delta::hasDelta | ( | ) | [pure virtual] |
hasDelta( ) is invoked by GemFire during Region::put( CacheableKeyPtr, CacheablePtr ) to determine if the object contains a delta.
If hasDelta( ) returns true, the delta in the object is serialized by invoking Delta::toDelta( DataOutput& ). If hasDelta( ) returns false, the object is serialized by invoking Cacheable::toData( DataOutput& ).
| virtual void gemfire::Delta::toDelta | ( | DataOutput & | out | ) | const [pure virtual] |
Writes out delta information to out in a user-defined format.
This is invoked on an application object after GemFire determines the presence of delta in it by calling hasDelta() on the object.
| IOException |