org.apache.ignite.client

## Interface ClientPartitionAwarenessMapper

-     public interface ClientPartitionAwarenessMapper

  This function calculates the cache key to a partition mapping for each cache key. It is used only for local calculation on a client side.

  When the `ClientConfiguration.isPartitionAwarenessEnabled()` and the cache was created with a custom `AffinityFunction` or a `AffinityKeyMapper` this function will be used to calculate mappings. Be sure that a key maps to the same partition produced by the `AffinityFunction.partition(Object)` method.

  Since:
    2.14
  See Also:
    `AffinityFunction.partition(Object)`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `partition(Object key)` Gets a partition number for a given key starting from `0`.

- - ### Method Detail

    - #### partition

          int partition(Object key)

      Gets a partition number for a given key starting from `0`. Be sure that a key maps to the same partition produced by the `AffinityFunction.partition(Object)` method.
      Parameters:
        `key` - Key to get partition for.
      Returns:
        Partition number for a given key.

${current.year} Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.15.0
Release Date | : April 25 2023