Package org.onosproject.cluster
Class DefaultPartition
- java.lang.Object
-
- org.onosproject.cluster.DefaultPartition
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
DefaultPartition()
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 boolean
equals(Object other)
PartitionId
getId()
Returns the partition identifier.Collection<NodeId>
getMembers()
Returns the controller nodes that are members of this partition.int
hashCode()
String
toString()
-
-
-
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:Partition
Returns the partition identifier.
-
getMembers
public Collection<NodeId> getMembers()
Description copied from interface:Partition
Returns the controller nodes that are members of this partition.- Specified by:
getMembers
in interfacePartition
- Returns:
- collection of controller node identifiers
-
-