Package io.atomix.primitive.partition
Class PartitionMetadata
java.lang.Object
io.atomix.primitive.partition.PartitionMetadata
Contains metadata about a partition. The metadata can be used to query for members of the
partition and to get member priorities.
-
Constructor Summary
ConstructorsConstructorDescriptionPartitionMetadata(PartitionId id, Set<MemberId> members, Map<MemberId, Integer> priority, int targetPriority, MemberId primary) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the primary member of the partition or null if there is no primaryintgetPriority(MemberId member) Return the priority of the node if the node is a member of the replication group for this partition.intinthashCode()id()Returns the partition identifier.members()Returns the controller nodes that are members of this partition.toString()
-
Constructor Details
-
PartitionMetadata
-
-
Method Details
-
id
Returns the partition identifier.- Returns:
- partition identifier
-
members
Returns the controller nodes that are members of this partition.- Returns:
- collection of controller node identifiers
-
getPriority
Return the priority of the node if the node is a member of the replication group for this partition. Otherwise return -1.- Returns:
- the priority of the member
-
getPrimary
Returns the primary member of the partition or null if there is no primary- Returns:
- member id or null
-
getTargetPriority
public int getTargetPriority() -
hashCode
public int hashCode() -
equals
-
toString
-