Package org.apache.ignite.client
Interface ClientPartitionAwarenessMapper
-
public interface ClientPartitionAwarenessMapperThis 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 customAffinityFunctionor aAffinityKeyMapperthis function will be used to calculate mappings. Be sure that a key maps to the same partition produced by theAffinityFunction.partition(Object)method.- Since:
- 2.14
- See Also:
AffinityFunction.partition(Object)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intpartition(Object key)Gets a partition number for a given key starting from0.
-
-
-
Method Detail
-
partition
int partition(Object key)
Gets a partition number for a given key starting from0. Be sure that a key maps to the same partition produced by theAffinityFunction.partition(Object)method.- Parameters:
key- Key to get partition for.- Returns:
- Partition number for a given key.
-
-