GemStone::GemFire::Cache::CacheableObjectXml Class Reference

Inherits GemStone::GemFire::Cache::IGFSerializable.


Detailed Description

A mutable generic System.Object wrapper that can serve as a distributable value for caching.

This class can contain any object and uses the System.Xml.Serialization.XmlSerializer to serialize and deserialize the object. So the user must use the XmlSerializer attributes to control the serialization/deserialization of the object (or implement the System.Xml.Serialization.IXmlSerializable ) to change the serialization/deserialization. However, the latter should be avoided for efficiency reasons and the user should implement IGFSerializable instead.

The user must keep in mind that the rules that apply to XmlSerializer would be the rules that apply to this class. For instance the user cannot pass objects of class implementing or containing System.Collections.IDictionary class, must use System.Xml.Serialization.XmlIncludeAttribute to mark user-defined types etc.

Public Member Functions

 CacheableObjectXml (Object^ value)
virtual IGFSerializableFromData (DataInput^ input)
virtual void ToData (DataOutput^ output)
virtual String^ ToString () override

Properties

virtual UInt32 ClassId [get]
virtual UInt32 ObjectSize [get]
Object^  Value [get]


Constructor & Destructor Documentation

GemStone::GemFire::Cache::CacheableObjectXml::CacheableObjectXml ( Object^   value  )  [inline]

Allocates a new instance from the given object.


Member Function Documentation

virtual IGFSerializable ^ GemStone::GemFire::Cache::CacheableObjectXml::FromData ( DataInput^   input  )  [virtual]

Deserializes the System.Object using System.Xml.Serialization.XmlSerializer class.

Parameters:
input the DataInput stream to use for reading the object data
Returns:
the deserialized object

Implements GemStone::GemFire::Cache::IGFSerializable.

virtual void GemStone::GemFire::Cache::CacheableObjectXml::ToData ( DataOutput^   output  )  [virtual]

Serializes this System.Object using System.Xml.Serialization.XmlSerializer class.

Parameters:
output the DataOutput object to use for serializing the object

Implements GemStone::GemFire::Cache::IGFSerializable.

virtual String ^ GemStone::GemFire::Cache::CacheableObjectXml::ToString (  )  [inline, override, virtual]

Return a string representation of the object.

Implements GemStone::GemFire::Cache::IGFSerializable.


Property Documentation

virtual UInt32 GemStone::GemFire::Cache::CacheableObjectXml::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.

Returns:
the classId

Implements GemStone::GemFire::Cache::IGFSerializable.

virtual UInt32 GemStone::GemFire::Cache::CacheableObjectXml::ObjectSize [get]

return the size of this object in bytes

Implements GemStone::GemFire::Cache::IGFSerializable.

Object^ GemStone::GemFire::Cache::CacheableObjectXml::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.


GemFire C++ Cache .NET API Documentation