# Package org.apache.ignite.cache.affinity

Contains cache node affinity implementations.

- Interface Summary
  Interface | Description
  --- | ---
  Affinity<K> | Provides affinity information to detect which node is primary and which nodes are backups for a partitioned or replicated cache.
  AffinityFunction | Cache key affinity which maps keys to nodes.
  AffinityFunctionContext | Affinity function context.
  AffinityKeyMapper | Deprecated. Use `AffinityKeyMapped` or `CacheKeyConfiguration.setAffinityKeyFieldName(String)` instead.

- Class Summary
  Class | Description
  --- | ---
  AffinityKey<K> | Optional wrapper for cache keys to provide support for custom affinity mapping.
  AffinityUuid | Guaranteed unique affinity-based key.

- Annotation Types Summary
  Annotation Type | Description
  --- | ---
  AffinityCentralizedFunction | Annotation marker which identifies affinity function that must be calculated on one centralized node instead of independently on each node.
  AffinityKeyMapped | Optional annotation to specify custom key-to-node affinity.