Package com.hazelcast.partition.strategy
Class AttributePartitioningStrategy
- java.lang.Object
-
- com.hazelcast.partition.strategy.AttributePartitioningStrategy
-
- All Implemented Interfaces:
PartitioningStrategy<java.lang.Object>
,java.io.Serializable
public final class AttributePartitioningStrategy extends java.lang.Object implements PartitioningStrategy<java.lang.Object>
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AttributePartitioningStrategy(java.lang.String... attributes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getPartitioningAttributes()
java.lang.Object
getPartitionKey(java.lang.Object key)
Returns the key object that will be used by Hazelcast to specify the partition.
-
-
-
Method Detail
-
getPartitionKey
public java.lang.Object getPartitionKey(java.lang.Object key)
Description copied from interface:PartitioningStrategy
Returns the key object that will be used by Hazelcast to specify the partition.- Specified by:
getPartitionKey
in interfacePartitioningStrategy<java.lang.Object>
- 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
-
getPartitioningAttributes
public java.lang.String[] getPartitioningAttributes()
-
-