Interface Partition


public interface Partition
In Hazelcast the data is split up in partitions: by default, 271 and configurable through the 'hazelcast.partition.count' ClusterProperty. Each partition is owned by one member and the ownership can change if members join or leave the cluster. Using this Partition object, you get access to who is the owner of a given partition. This object is not a DTO, so it will be updated when a member changes ownership.
  • Method Summary

    Modifier and Type Method Description
    Member getOwner()
    Returns the current member that owns this partition.
    int getPartitionId()
    Returns the ID of the partition.
  • Method Details

    • getPartitionId

      int getPartitionId()
      Returns the ID of the partition. This value will never change and will always be greater to or equal to 0 and smaller than the partition-count.
      Returns:
      the ID of the partition
    • getOwner

      Member getOwner()
      Returns the current member that owns this partition. The returned value could be stale as soon as it is returned. It can be that null is returned if the owner of a partition has not been established.
      Returns:
      the owner member of the partition