Package com.hazelcast.partition.strategy
Class DefaultPartitioningStrategy
java.lang.Object
com.hazelcast.partition.strategy.DefaultPartitioningStrategy
- All Implemented Interfaces:
PartitioningStrategy,Serializable
A
PartitioningStrategy that checks if the key implements PartitionAware.
If so, the PartitionAware.getPartitionKey() is called. Otherwise null is returned.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPartitionKey(Object key) Returns the key object that will be used by Hazelcast to specify the partition.
-
Constructor Details
-
DefaultPartitioningStrategy
public DefaultPartitioningStrategy()
-
-
Method Details
-
getPartitionKey
Description copied from interface:PartitioningStrategyReturns the key object that will be used by Hazelcast to specify the partition.- Specified by:
getPartitionKeyin interfacePartitioningStrategy- Parameters:
key- actual key object used by Hazelcast to specify the partition- Returns:
- the partition key object, or null to fall back to the default partition calculation
-