VMware Tanzu GemFire Native .NET Reference
10.1.5
|
This interface class is the superclass of all user objects in the cache that can be used as a key. More...
Inherits Apache::Geode::Client::ISerializable.
Inherited by Apache::Geode::Client::CacheableDate, Apache::Geode::Client::CacheableFileName, and Apache::Geode::Client::CacheableKey.
Public Member Functions | |
bool | Equals (ICacheableKey^ other) |
Returns true if this ICacheableKey matches the other. More... | |
System::Int32 | GetHashCode () |
Get the hash code for this object. More... | |
String ^ | ToString () |
Return a string representation of the object. More... | |
Properties | |
System::UInt64 | ObjectSize [get] |
Get the size of this object in bytes. More... | |
This interface class is the superclass of all user objects in the cache that can be used as a key.
If an implementation is required to act as a key in the cache, then it must implement this interface and preferably override System.Object.ToString
to obtain proper string representation. Note that this interface requires that the class overrides Object.GetHashCode
. Though this is not enforced, the default implementation in System.Object
is almost certainly incorrect and will not work correctly.
bool Apache::Geode::Client::ICacheableKey::Equals | ( | ICacheableKey^ | other | ) |
Returns true if this ICacheableKey
matches the other.
Implemented in Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt32, System::Int32, static_cast< int8_t >(DSCode::CacheableInt32)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt16, System::Int16, static_cast< int8_t >(DSCode::CacheableInt16)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableCharacter, Char, static_cast< int8_t >(DSCode::CacheableCharacter)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableFloat, Single, static_cast< int8_t >(DSCode::CacheableFloat)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt64, System::Int64, static_cast< int8_t >(DSCode::CacheableInt64)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableDouble, Double, static_cast< int8_t >(DSCode::CacheableDouble)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableByte, Byte, static_cast< int8_t >(DSCode::CacheableByte)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableBoolean, bool, static_cast< int8_t >(DSCode::CacheableBoolean)>, Apache::Geode::Client::CacheableKey, Apache::Geode::Client::CacheableFileName, Apache::Geode::Client::CacheableDate, and Apache::Geode::Client::CacheableString.
System::Int32 Apache::Geode::Client::ICacheableKey::GetHashCode | ( | ) |
Get the hash code for this object.
This is used in the internal hash tables and so must have a nice distribution pattern.
Implemented in Apache::Geode::Client::CacheableString, Apache::Geode::Client::CacheableKey, Apache::Geode::Client::CacheableFileName, and Apache::Geode::Client::CacheableDate.
|
inherited |
Return a string representation of the object.
Implemented in Apache::Geode::Client::Serializable, Apache::Geode::Client::CacheableStringArray, Apache::Geode::Client::CacheableString, Apache::Geode::Client::CacheableObjectXml, Apache::Geode::Client::CacheableObject, Apache::Geode::Client::CacheableFileName, Apache::Geode::Client::CacheableDate, Apache::Geode::Client::CacheableBuiltinArray< TNative, TNativePtr, TManaged, TYPEID >, Apache::Geode::Client::CacheableBuiltinArray< NativeArray, NativeArray, ManagedType, DsCode >, Apache::Geode::Client::CacheableBuiltinKey< TNative, TManaged, TYPEID >, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt32, System::Int32, static_cast< int8_t >(DSCode::CacheableInt32)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt16, System::Int16, static_cast< int8_t >(DSCode::CacheableInt16)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableCharacter, Char, static_cast< int8_t >(DSCode::CacheableCharacter)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableFloat, Single, static_cast< int8_t >(DSCode::CacheableFloat)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableInt64, System::Int64, static_cast< int8_t >(DSCode::CacheableInt64)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableDouble, Double, static_cast< int8_t >(DSCode::CacheableDouble)>, Apache::Geode::Client::CacheableBuiltinKey< native::CacheableByte, Byte, static_cast< int8_t >(DSCode::CacheableByte)>, and Apache::Geode::Client::CacheableBuiltinKey< native::CacheableBoolean, bool, static_cast< int8_t >(DSCode::CacheableBoolean)>.
|
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.