VMware GemFire Native Client C++ API Reference
|
VMware VMware GemFire Native C++ Reference 10.4.3
|
This interface is used for delta propagation. More...
#include <Delta.hpp>
Public Member Functions | |
| virtual std::shared_ptr< Delta > | clone () const =0 |
| 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 () const =0 |
hasDelta( ) is invoked by Geode during Region::put(
std::shared_ptr<CacheableKey>, std::shared_ptr<Cacheable> ) 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. | |
Detailed Description
This interface is used for delta propagation.
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 Geode 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.
Member Function Documentation
◆ clone()
|
pure 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.
◆ fromDelta()
|
pure virtual |
Reads in delta information to this object in a user-defined format.
This is invoked on an existing application object after Geode determines the presence of delta in DataInput instance.
- Exceptions
-
IOException InvalidDeltaException if the delta in the DataInputinstance cannot be applied to this instance (possible causes may include mismatch of Delta version or logic error).
◆ hasDelta()
|
pure virtual |
hasDelta( ) is invoked by Geode during Region::put(
std::shared_ptr<CacheableKey>, std::shared_ptr<Cacheable> ) 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& ).
◆ toDelta()
|
pure virtual |
Writes out delta information to out in a user-defined format.
This is invoked on an application object after Geode determines the presence of delta in it by calling hasDelta() on the object.
- Exceptions
-
IOException
Apache Geode C++ Cache API Documentation