This class can serialize any class which has either the [Serializable] attribute set or implements System.Runtime.Serialization.ISerializable interface. However, for better efficiency the latter should be avoided and the user should implement IGFSerializable instead.
The user must keep in mind that the rules that apply to runtime serialization would be the rules that apply to this class. For the serialization will be carried out by serializing all the members (public/private/protected) of the class. Each of the contained classes should also have either the [Serializable] attribute set or implement ISerializable interface.
Public Member Functions | |
| CacheableObject (Object^ value) | |
| virtual IGFSerializable^ | FromData (DataInput^ input) |
| virtual void | ToData (DataOutput^ output) |
| virtual String^ | ToString () override |
Properties | |
| virtual UInt32 | ClassId [get] |
| virtual UInt32 | ObjectSize [get] |
| Object^ | Value [get] |
| GemStone::GemFire::Cache::CacheableObject::CacheableObject | ( | Object^ | value | ) | [inline] |
Allocates a new instance from the given object.
| virtual IGFSerializable ^ GemStone::GemFire::Cache::CacheableObject::FromData | ( | DataInput^ | input | ) | [virtual] |
Deserializes the System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.
| input | the DataInput stream to use for reading the object data |
Implements GemStone::GemFire::Cache::IGFSerializable.
| virtual void GemStone::GemFire::Cache::CacheableObject::ToData | ( | DataOutput^ | output | ) | [virtual] |
Serializes this System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.
| output | the DataOutput object to use for serializing the object |
Implements GemStone::GemFire::Cache::IGFSerializable.
| virtual String ^ GemStone::GemFire::Cache::CacheableObject::ToString | ( | ) | [inline, override, virtual] |
Return a string representation of the object.
Implements GemStone::GemFire::Cache::IGFSerializable.
virtual UInt32 GemStone::GemFire::Cache::CacheableObject::ClassId [get] |
Returns the classId of the instance being serialized. This is used by deserialization to determine what instance type to create and deserialize into.
Implements GemStone::GemFire::Cache::IGFSerializable.
virtual UInt32 GemStone::GemFire::Cache::CacheableObject::ObjectSize [get] |
return the size of this object in bytes
Implements GemStone::GemFire::Cache::IGFSerializable.
Object^ GemStone::GemFire::Cache::CacheableObject::Value [get] |
Gets the object value.
The user can modify the object and the changes shall be reflected immediately in the local cache. For this change to be propagate to other members of the distributed system, the object needs to be put into the cache.