Package com.hazelcast.partition
Interface PartitioningStrategy<K>
-
- Type Parameters:
K
- key type
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
AttributePartitioningStrategy
,DefaultPartitioningStrategy
,StringAndPartitionAwarePartitioningStrategy
,StringPartitioningStrategy
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public interface PartitioningStrategy<K> extends java.io.Serializable
PartitioningStrategy allows keys to be located on the same member. This causes related data to be stored in the same location. (See data-affinity.)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.lang.Object
getPartitionKey(K key)
Returns the key object that will be used by Hazelcast to specify the partition.
-
-
-
Method Detail
-
getPartitionKey
java.lang.Object getPartitionKey(K key)
Returns the key object that will be used by Hazelcast to specify the partition.- Parameters:
key
- actual key object used by Hazelcast to specify the partition- Returns:
- the partition key object, or null to fallback to the default partition calculation
-
-