VMware GemFire Native .NET Reference  9.2.4
Apache::Geode::Client::CacheableObject Class Reference

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

Inherits Apache::Geode::Client::IGeodeSerializable.

Public Member Functions

virtual IGeodeSerializableFromData (DataInput^ input)
 Deserializes the System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class. More...
 
virtual void ToData (DataOutput^ output)
 Serializes this System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class. More...
 
virtual String ^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

static CacheableObjectCreate (Object^ value)
 Static function to create a new instance from the given object. More...
 
static IGeodeSerializableCreateDeserializable ()
 Factory function to register this class. More...
 

Properties

virtual System::UInt32 ClassId [get]
 Returns the classId of the instance being serialized. More...
 
virtual System::UInt32 ObjectSize [get]
 return the size of this object in bytes More...
 
Object^ Value [get]
 Gets the object value. More...
 

Detailed Description

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

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 ../../IGeodeSerializable 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.

Member Function Documentation

◆ Create()

static CacheableObject ^ Apache::Geode::Client::CacheableObject::Create ( Object^  value)
inlinestatic

Static function to create a new instance from the given object.

If the given object is null then this method returns null.

◆ CreateDeserializable()

static IGeodeSerializable ^ Apache::Geode::Client::CacheableObject::CreateDeserializable ( )
inlinestatic

Factory function to register this class.

◆ FromData()

virtual IGeodeSerializable ^ Apache::Geode::Client::CacheableObject::FromData ( DataInput input)
virtual

Deserializes the System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.

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

Implements Apache::Geode::Client::IGeodeSerializable.

◆ ToData()

virtual void Apache::Geode::Client::CacheableObject::ToData ( DataOutput output)
virtual

Serializes this System.Object using System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class.

Parameters
outputthe DataOutput object to use for serializing the object

Implements Apache::Geode::Client::IGeodeSerializable.

◆ ToString()

virtual String ^ Apache::Geode::Client::CacheableObject::ToString ( )
inlineoverridevirtual

Return a string representation of the object.

Implements Apache::Geode::Client::IGeodeSerializable.

Property Documentation

◆ ClassId

virtual System:: UInt32 Apache::Geode::Client::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.

Returns
the classId

◆ ObjectSize

virtual System:: UInt32 Apache::Geode::Client::CacheableObject::ObjectSize
get

return the size of this object in bytes

◆ Value

Object^ Apache::Geode::Client::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.


VMware GemFire .NET Cache API Documentation