com.hazelcast.core
Interface Partition

All Known Implementing Classes:
PartitionServiceProxy.PartitionProxy

public interface Partition

In Hazelcast the data is split up in partitions: by default, 271 and configurable through the 'hazelcast.partition.count' GroupProperty. 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
 Member getOwner()
          Returns the current member that owns this partition.
 int getPartitionId()
          Returns the id of the partition.
 

Method Detail

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


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