Options
All
  • Public
  • Public/Protected
  • All
Menu

Implementing PartitionAware allows one to override the default partitioning scheme. Instead of using the keys themselves to spread the data around the cluster the key contained in partitionKey is used.

This provides the user with an ability to contain related keys within the same partition and, consequently, within the same node.

In Hazelcast, disparate data structures will be stored on the same partition, based on the partition key. For example, if "Steve" was used, then the following would be on one partition.

  • a customers IMap with an entry of key "Steve"
  • an orders IMap using a customer key type implementing PartitionAware with key "Steve"
  • any queue named "Steve"
  • any PartitionAware object with partition key "Steve"

Type parameters

  • T

Hierarchy

  • PartitionAware

Index

Properties

Properties

partitionKey: T

The key that will be used by Hazelcast to specify the partition. You should give the same key for objects that you want to be in the same partition.

Generated using TypeDoc