com.hazelcast.partition.strategy
Class DefaultPartitioningStrategy

java.lang.Object
  extended by com.hazelcast.partition.strategy.DefaultPartitioningStrategy
All Implemented Interfaces:
PartitioningStrategy

public class DefaultPartitioningStrategy
extends Object
implements PartitioningStrategy

A PartitioningStrategy that checks if the key implements PartitionAware. If so, the PartitionAware.getPartitionKey() is called. Otherwise null is returned.


Constructor Summary
DefaultPartitioningStrategy()
           
 
Method Summary
 Object getPartitionKey(Object key)
          Returns the key object that will be used by Hazelcast to specify the partition.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultPartitioningStrategy

public DefaultPartitioningStrategy()
Method Detail

getPartitionKey

public Object getPartitionKey(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 interface PartitioningStrategy
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


Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.