Pivotal GemFire Native .NET Reference  10.2.0
Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID > Class Template Reference

An immutable template wrapper for C++ CacheableKeys that can serve as a distributable key object for caching. More...

Inherits Apache::Geode::Client::IDataSerializablePrimitive, and Apache::Geode::Client::CacheableKey.

Public Member Functions

 CacheableBuiltinKey ()
 Allocates a new instance More...
 
 CacheableBuiltinKey (TManaged value)
 Allocates a new instance with the given value. More...
 
virtual bool Equals (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 System::Int32 GetHashCode () override
 Return the hashcode for this key. More...
 
bool operator== (TManaged other)
 Comparison operator against another value. More...
 
String ^ ToString () override
 Return a string representation of the object. More...
 

Static Public Member Functions

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

Protected Member Functions

 CacheableBuiltinKey (std::shared_ptr< native::Serializable > nativeptr)
 Protected constructor to wrap a native object pointer More...
 

Properties

System::UInt64 ObjectSize [get]
 Get the size of this object in bytes. More...
 
virtual System::UInt64 ObjectSize [get]
 return the size of this object in bytes More...
 
TManaged Value [get]
 Gets the value. More...
 

Detailed Description

template<typename TNative, typename TManaged, int8_t TYPEID>
class Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >

An immutable template wrapper for C++ CacheableKeys that can serve as a distributable key object for caching.

Constructor & Destructor Documentation

◆ CacheableBuiltinKey() [1/3]

template<typename TNative , typename TManaged , int8_t TYPEID>
Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::CacheableBuiltinKey ( )
inline

Allocates a new instance

◆ CacheableBuiltinKey() [2/3]

template<typename TNative , typename TManaged , int8_t TYPEID>
Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::CacheableBuiltinKey ( TManaged  value)
inline

Allocates a new instance with the given value.

Parameters
valuethe value of the new instance

◆ CacheableBuiltinKey() [3/3]

template<typename TNative , typename TManaged , int8_t TYPEID>
Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::CacheableBuiltinKey ( std::shared_ptr< native::Serializable >  nativeptr)
inlineprotected

Protected constructor to wrap a native object pointer

Parameters
nativeptrThe native object pointer

Member Function Documentation

◆ Equals() [1/2]

template<typename TNative , typename TManaged , int8_t TYPEID>
virtual bool Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::Equals ( ICacheableKey other)
inlineoverridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying native object.

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

◆ Equals() [2/2]

template<typename TNative , typename TManaged , int8_t TYPEID>
virtual bool Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::Equals ( Object^  obj)
inlineoverridevirtual

Return true if this key matches other object.

It invokes the '==' operator of the underlying native object.

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

◆ GetHashCode()

virtual System::Int32 Apache::Geode::Client::CacheableKey::GetHashCode ( )
overridevirtualinherited

Return the hashcode for this key.

It gets the hash code by calling the hashcode() function of the underlying apache::geode::client::CacheableKey object.

Implements Apache::Geode::Client::ICacheableKey.

Reimplemented in Apache::Geode::Client::CacheableString.

◆ 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==()

template<typename TNative , typename TManaged , int8_t TYPEID>
bool Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::operator== ( TManaged  other)
inline

Comparison operator against another value.

◆ ToString()

template<typename TNative , typename TManaged , int8_t TYPEID>
String ^ Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::ToString ( )
inlineoverride

Return a string representation of the object.

This returns the string for the Value property.

Implements Apache::Geode::Client::ISerializable.

Property Documentation

◆ ObjectSize [1/2]

System:: UInt64 Apache::Geode::Client::ISerializable::ObjectSize
getinherited

Get the size of this object in bytes.

This is only needed if you use the HeapLRU feature.

Note that you can simply return zero if you are not using the HeapLRU feature.

Returns
the size of this object in bytes.

◆ ObjectSize [2/2]

virtual System:: UInt64 Apache::Geode::Client::Serializable::ObjectSize
getinherited

return the size of this object in bytes

◆ Value

template<typename TNative , typename TManaged , int8_t TYPEID>
TManaged Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >::Value
get

Gets the value.


Apache Geode C++ Cache .NET API Documentation