com.hazelcast.core
Interface PartitioningStrategy<K>

Type Parameters:
K - key type
All Known Implementing Classes:
DefaultPartitioningStrategy, StringAndPartitionAwarePartitioningStrategy, StringPartitioningStrategy

public interface PartitioningStrategy<K>

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
 Object getPartitionKey(K key)
          Returns the key object that will be used by Hazelcast to specify the partition.
 

Method Detail

getPartitionKey

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


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