Package org.onosproject.cluster
Class DefaultPartition
- java.lang.Object
-
- org.onosproject.cluster.DefaultPartition
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedDefaultPartition()Constructs an empty partition for the serializer.DefaultPartition(Partition other)Constructs a partition that is a copy of another.DefaultPartition(PartitionId id, Collection<NodeId> members)Constructs a partition.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object other)PartitionIdgetId()Returns the partition identifier.Collection<NodeId>getMembers()Returns the controller nodes that are members of this partition.inthashCode()StringtoString()
-
-
-
Constructor Detail
-
DefaultPartition
protected DefaultPartition()
Constructs an empty partition for the serializer.
-
DefaultPartition
public DefaultPartition(PartitionId id, Collection<NodeId> members)
Constructs a partition.- Parameters:
id- partition identifiermembers- partition member nodes
-
DefaultPartition
public DefaultPartition(Partition other)
Constructs a partition that is a copy of another.- Parameters:
other- partition to copy
-
-
Method Detail
-
getId
public PartitionId getId()
Description copied from interface:PartitionReturns the partition identifier.
-
getMembers
public Collection<NodeId> getMembers()
Description copied from interface:PartitionReturns the controller nodes that are members of this partition.- Specified by:
getMembersin interfacePartition- Returns:
- collection of controller node identifiers
-
-