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

An immutable string wrapper that can serve as a distributable key object for caching as well as being a string value. More...

Inherits Apache::Geode::Client::CacheableKey.

Public Member Functions

 CacheableString (array< Char >^ value)
 Allocates a new instance copying from the given character array. More...
 
 CacheableString (String^ value)
 Allocates a new instance copying from the given string. More...
 
virtual bool Equals (Apache::Geode::Client::ICacheableKey^ other) override
 Return true if this key matches other object. More...
 
virtual bool Equals (Object^ obj) override
 Return true if this key matches other object. More...
 
virtual IGeodeSerializableFromData (DataInput^ input) override
 Deserializes the managed object – returns an instance of the IGeodeSerializable class. More...
 
virtual System::Int32 GetHashCode () override
 Return the hashcode for this key. More...
 
virtual void ToData (DataOutput^ output) override
 Serializes this managed object. More...
 
virtual String ^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

static CacheableStringCreate (array< Char >^ value)
 Static function to create a new instance copying from the given character array. More...
 
static CacheableStringCreate (String^ value)
 Static function to create a new instance copying from the given string. More...
 
static bool IsNullOrEmpty (CacheableString^ value)
 Static function to check whether IsNullOrEmpty. More...
 
static operator Apache::Geode::Client::Serializable^ (array< bool >^ value)
 Implicit conversion operator from an boolean array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Byte >^ value)
 Implicit conversion operator from an array of bytes to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Char >^ value)
 Implicit conversion operator from a character array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Double >^ value)
 Implicit conversion operator from a double array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< Single >^ value)
 Implicit conversion operator from a float array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< String^>^ value)
 Implicit conversion operator from a string array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int16 >^ value)
 Implicit conversion operator from a 16-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int32 >^ value)
 Implicit conversion operator from a 32-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (array< System::Int64 >^ value)
 Implicit conversion operator from a 64-bit integer array to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (bool value)
 Implicit conversion operator from a boolean to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Byte value)
 Implicit conversion operator from a byte to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Char value)
 Implicit conversion operator from a character to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Double value)
 Implicit conversion operator from a double to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (Single value)
 Implicit conversion operator from a float to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (String^ value)
 Implicit conversion operator from a string to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (System::Int16 value)
 Implicit conversion operator from a 16-bit integer to a Serializable. More...
 
static operator Apache::Geode::Client::Serializable^ (System::Int32 value)
 Implicit conversion operator from a 32-bit integer to a Serializable. More...
 
static operator CacheableKey^ (bool value)
 Implicit conversion operator from a boolean to a CacheableKey. More...
 
static operator CacheableKey^ (Byte value)
 Implicit conversion operator from a byte to a CacheableKey. More...
 
static operator CacheableKey^ (Char value)
 Implicit conversion operator from a character to a CacheableKey. More...
 
static operator CacheableKey^ (Double value)
 Implicit conversion operator from a double to a CacheableKey. More...
 
static operator CacheableKey^ (Single value)
 Implicit conversion operator from a float to a CacheableKey. More...
 
static operator CacheableKey^ (String^ value)
 Implicit conversion operator from a string to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int16 value)
 Implicit conversion operator from a 16-bit integer to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int32 value)
 Implicit conversion operator from a 32-bit integer to a CacheableKey. More...
 
static operator CacheableKey^ (System::Int64 value)
 Implicit conversion operator from a 64-bit integer to a CacheableKey. More...
 
static operator Serializable^ (System::Int64 value)
 Implicit conversion operator from a 64-bit integer to a Serializable. More...
 
static operator String ^ (CacheableString^ str)
 Implicit conversion operator to underlying System.String. More...
 
static void RegisterPdxSerializer (IPdxSerializer^ pdxSerializer)
 Set the PDX serializer for the cache. More...
 
static void RegisterPdxType (PdxTypeFactoryMethod^ creationMethod)
 
static void RegisterTypeGeneric (TypeFactoryMethodGeneric^ creationMethod)
 Register an instance factory method for a given type. More...
 
static void SetPdxTypeMapper (IPdxTypeMapper^ pdxTypeMapper)
 Register an PdxTypeMapper to map the local types to pdx types More...
 

Properties

virtual System::UInt32 ClassId [get]
 Returns the classId of the instance being serialized. More...
 
bool IsWideString [get]
 True when the underlying C string is a wide-character string. More...
 
System::UInt32 Length [get]
 Gets the length of the underlying C string. More...
 
virtual System::UInt32 ObjectSize [get]
 return the size of this object in bytes More...
 
String^ Value [get]
 Gets the string value. More...
 

Detailed Description

An immutable string wrapper that can serve as a distributable key object for caching as well as being a string value.

Constructor & Destructor Documentation

◆ CacheableString() [1/2]

Apache::Geode::Client::CacheableString::CacheableString ( String^  value)

Allocates a new instance copying from the given string.

Parameters
valuethe string value of the new instance
Exceptions
IllegalArgumentExceptionif the provided string is null or has zero length

◆ CacheableString() [2/2]

Apache::Geode::Client::CacheableString::CacheableString ( array< Char >^  value)

Allocates a new instance copying from the given character array.

Parameters
valuethe character array value of the new instance
Exceptions
IllegalArgumentExceptionif the provided array is null or has zero length

Member Function Documentation

◆ Create() [1/2]

static CacheableString ^ Apache::Geode::Client::CacheableString::Create ( array< Char >^  value)
inlinestatic

Static function to create a new instance copying from the given character array.

Providing a null or zero size character array will return a null CacheableString object.

Parameters
valuethe character array value of the new instance

◆ Create() [2/2]

static CacheableString ^ Apache::Geode::Client::CacheableString::Create ( String^  value)
inlinestatic

Static function to create a new instance copying from the given string.

Providing a null or zero size string will return a null CacheableString object.

Parameters
valuethe string value of the new instance

◆ Equals() [1/2]

virtual bool Apache::Geode::Client::CacheableString::Equals ( Apache::Geode::Client::ICacheableKey other)
overridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying apache::geode::client::CacheableString object.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ Equals() [2/2]

virtual bool Apache::Geode::Client::CacheableString::Equals ( Object^  obj)
overridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying apache::geode::client::CacheableString object.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ FromData()

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

Deserializes the managed object – returns an instance of the IGeodeSerializable class.

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

Reimplemented from Apache::Geode::Client::Serializable.

◆ GetHashCode()

virtual System::Int32 Apache::Geode::Client::CacheableString::GetHashCode ( )
overridevirtual

Return the hashcode for this key.

Reimplemented from Apache::Geode::Client::CacheableKey.

◆ IsNullOrEmpty()

static bool Apache::Geode::Client::CacheableString::IsNullOrEmpty ( CacheableString value)
inlinestatic

Static function to check whether IsNullOrEmpty.

This is similar to the C# string.IsNullOrEmpty method.

Parameters
valuethe CacheableString value to check

◆ operator Apache::Geode::Client::Serializable^() [1/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< bool >^  value)
staticinherited

Implicit conversion operator from an boolean array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [2/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Byte >^  value)
staticinherited

Implicit conversion operator from an array of bytes to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [3/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Char >^  value)
staticinherited

Implicit conversion operator from a character array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [4/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Double >^  value)
staticinherited

Implicit conversion operator from a double array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [5/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< Single >^  value)
staticinherited

Implicit conversion operator from a float array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [6/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< String^>^  value)
staticinherited

Implicit conversion operator from a string array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [7/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int16 >^  value)
staticinherited

Implicit conversion operator from a 16-bit integer array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [8/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int32 >^  value)
staticinherited

Implicit conversion operator from a 32-bit integer array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [9/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( array< System::Int64 >^  value)
staticinherited

Implicit conversion operator from a 64-bit integer array to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [10/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( bool  value)
staticinherited

Implicit conversion operator from a boolean to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [11/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Byte  value)
staticinherited

Implicit conversion operator from a byte to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [12/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Char  value)
staticinherited

Implicit conversion operator from a character to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [13/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Double  value)
staticinherited

Implicit conversion operator from a double to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [14/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( Single  value)
staticinherited

Implicit conversion operator from a float to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [15/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( String^  value)
staticinherited

Implicit conversion operator from a string to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [16/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( System::Int16  value)
staticinherited

Implicit conversion operator from a 16-bit integer to a Serializable.

◆ operator Apache::Geode::Client::Serializable^() [17/17]

static Apache::Geode::Client::Serializable::operator Apache::Geode::Client::Serializable^ ( System::Int32  value)
staticinherited

Implicit conversion operator from a 32-bit integer to a Serializable.

◆ operator CacheableKey^() [1/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( bool  value)
staticinherited

Implicit conversion operator from a boolean to a CacheableKey.

◆ operator CacheableKey^() [2/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Byte  value)
staticinherited

Implicit conversion operator from a byte to a CacheableKey.

◆ operator CacheableKey^() [3/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Char  value)
staticinherited

Implicit conversion operator from a character to a CacheableKey.

◆ operator CacheableKey^() [4/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Double  value)
staticinherited

Implicit conversion operator from a double to a CacheableKey.

◆ operator CacheableKey^() [5/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( Single  value)
staticinherited

Implicit conversion operator from a float to a CacheableKey.

◆ operator CacheableKey^() [6/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( String^  value)
staticinherited

Implicit conversion operator from a string to a CacheableKey.

◆ operator CacheableKey^() [7/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int16  value)
staticinherited

Implicit conversion operator from a 16-bit integer to a CacheableKey.

◆ operator CacheableKey^() [8/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int32  value)
staticinherited

Implicit conversion operator from a 32-bit integer to a CacheableKey.

◆ operator CacheableKey^() [9/9]

static Apache::Geode::Client::CacheableKey::operator CacheableKey^ ( System::Int64  value)
staticinherited

Implicit conversion operator from a 64-bit integer to a CacheableKey.

◆ operator Serializable^()

static Apache::Geode::Client::Serializable::operator Serializable^ ( System::Int64  value)
staticinherited

Implicit conversion operator from a 64-bit integer to a Serializable.

◆ operator String ^()

static Apache::Geode::Client::CacheableString::operator String ^ ( CacheableString str)
inlinestatic

Implicit conversion operator to underlying System.String.

◆ RegisterPdxSerializer()

static void Apache::Geode::Client::Serializable::RegisterPdxSerializer ( IPdxSerializer pdxSerializer)
staticinherited

Set the PDX serializer for the cache.

If this serializer is set, it will be consulted to see if it can serialize any domain classes which are added to the cache in portable data exchange format.

◆ RegisterPdxType()

static void Apache::Geode::Client::Serializable::RegisterPdxType ( PdxTypeFactoryMethod creationMethod)
staticinherited

Register an instance factory method for a given type. This should be used when registering types that implement IPdxSerializable.

Parameters
creationMethodthe creation function to register
Exceptions
IllegalArgumentExceptionif the method is null

◆ RegisterTypeGeneric()

static void Apache::Geode::Client::Serializable::RegisterTypeGeneric ( TypeFactoryMethodGeneric creationMethod)
staticinherited

Register an instance factory method for a given type.

This should be used when registering types that implement IGeodeSerializable.

Parameters
creationMethodthe creation function to register
Exceptions
IllegalArgumentExceptionif the method is null
IllegalStateExceptionif the typeId has already been registered, or there is an error in registering the type; check Utils::LastError for more information in the latter case.

◆ SetPdxTypeMapper()

static void Apache::Geode::Client::Serializable::SetPdxTypeMapper ( IPdxTypeMapper pdxTypeMapper)
staticinherited

Register an PdxTypeMapper to map the local types to pdx types

Parameters
pdxTypeMapperObject which implements IPdxTypeMapper interface

◆ ToData()

virtual void Apache::Geode::Client::CacheableString::ToData ( DataOutput output)
overridevirtual

Serializes this managed object.

Parameters
outputthe DataOutput object to use for serializing the object

Reimplemented from Apache::Geode::Client::Serializable.

◆ ToString()

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

Return a string representation of the object.

This returns the same string as Value property.

Reimplemented from Apache::Geode::Client::Serializable.

Property Documentation

◆ ClassId

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

◆ IsWideString

bool Apache::Geode::Client::CacheableString::IsWideString
get

True when the underlying C string is a wide-character string.

◆ Length

System:: UInt32 Apache::Geode::Client::CacheableString::Length
get

Gets the length of the underlying C string.

◆ ObjectSize

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

return the size of this object in bytes

◆ Value

String^ Apache::Geode::Client::CacheableString::Value
get

Gets the string value.


VMware GemFire .NET Cache API Documentation