Struct AffinityKey
Optional wrapper for cache keys to provide support for custom affinity mapping. The value returned by Affinity will be used for key-to-node affinity.
Implements
Namespace: Apache.Ignite.Core.Cache.Affinity
Assembly: Apache.Ignite.Core.dll
Syntax
public struct AffinityKey
Constructors
AffinityKey(Object)
Initializes a new instance of the AffinityKey struct.
Declaration
public AffinityKey(object key)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | The key. |
AffinityKey(Object, Object)
Initializes a new instance of the AffinityKey struct.
Declaration
public AffinityKey(object key, object affinity)
Parameters
Type | Name | Description |
---|---|---|
System.Object | key | The key. |
System.Object | affinity | The affinity key. |
Properties
Affinity
Gets the affinity key.
Declaration
public readonly object Affinity { get; }
Property Value
Type | Description |
---|---|
System.Object |
Key
Gets the key.
Declaration
public readonly object Key { get; }
Property Value
Type | Description |
---|---|
System.Object |
Methods
Equals(AffinityKey)
Indicates whether the current object is equal to another object of the same type.
Declaration
public bool Equals(AffinityKey other)
Parameters
Type | Name | Description |
---|---|---|
AffinityKey | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean | true if the current object is equal to the |
Equals(Object)
Determines whether the specified
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj | The |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetHashCode()
Returns a hash code for this instance.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. |
ToString()
Returns a
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | A |
WriteBinary(IBinaryWriter)
Writes this object to the given writer.
Declaration
public void WriteBinary(IBinaryWriter writer)
Parameters
Type | Name | Description |
---|---|---|
IBinaryWriter | writer | Writer. |
Operators
Equality(AffinityKey, AffinityKey)
Implements the operator ==.
Declaration
public static bool operator ==(AffinityKey left, AffinityKey right)
Parameters
Type | Name | Description |
---|---|---|
AffinityKey | left | The left. |
AffinityKey | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |
Inequality(AffinityKey, AffinityKey)
Implements the operator !=.
Declaration
public static bool operator !=(AffinityKey left, AffinityKey right)
Parameters
Type | Name | Description |
---|---|---|
AffinityKey | left | The left. |
AffinityKey | right | The right. |
Returns
Type | Description |
---|---|
System.Boolean | The result of the operator. |