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.CacheAssembly: 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
<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>
Public Interface ICacheableKey
Inherits IGFSerializable
[ObsoleteAttribute(L"Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")]
public interface class ICacheableKey : IGFSerializable
[<ObsoleteAttribute("Use classes and APIs from the GemStone.GemFire.Cache.Generic namespace")>]
type ICacheableKey =
interface
interface IGFSerializable
end
The ICacheableKey type exposes the following members.
Properties
| Name | Description |
---|
 | ClassId |
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.) |
 | ObjectSize |
Get the size of this object in bytes.
This is only needed if you use the HeapLRU feature.
(Inherited from IGFSerializable.) |
Top
Methods
| Name | Description |
---|
 | Equals |
Returns true if this ICacheableKey matches the other.
|
 | FromData |
Deserialize this object, typical implementation should return
the 'this' pointer.
(Inherited from IGFSerializable.) |
 | GetHashCode |
Get the hash code for this object. This is used in the internal
hash tables and so must have a nice distribution pattern.
|
 | ToData |
Serializes this object.
(Inherited from IGFSerializable.) |
 | ToString |
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