Click or drag to resize
ICacheableKey Interface

Note: This API is now obsolete.

This interface class is the superclass of all user objects in the cache that can be used as a key.

Namespace: GemStone.GemFire.Cache
Assembly: Gemstone.Gemfire.Cache (in Gemstone.Gemfire.Cache.dll) Version: 9.0.6.18
Syntax
[ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public interface ICacheableKey : IGFSerializable

The ICacheableKey type exposes the following members.

Properties
  NameDescription
Public propertyClassId
Returns the classId of the instance being serialized. This is used by deserialization to determine what instance type to create and deserialize into.
(Inherited from IGFSerializable.)
Public propertyObjectSize
Get the size of this object in bytes. This is only needed if you use the HeapLRU feature.
(Inherited from IGFSerializable.)
Top
Methods
  NameDescription
Public methodEquals
Returns true if this ICacheableKey matches the other.
Public methodFromData
Deserialize this object, typical implementation should return the 'this' pointer.
(Inherited from IGFSerializable.)
Public methodGetHashCode
Get the hash code for this object. This is used in the internal hash tables and so must have a nice distribution pattern.
Public methodToData
Serializes this object.
(Inherited from IGFSerializable.)
Public methodToString
Return a string representation of the object.
(Inherited from IGFSerializable.)
Top
Remarks
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.
See Also