Package org.onosproject.cluster
Class PartitionDiff
- java.lang.Object
-
- org.onosproject.cluster.PartitionDiff
-
-
Constructor Summary
Constructors Constructor Description PartitionDiff(Partition oldValue, Partition newValue)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
boolean
hasChanged()
Returns if there are differences between the two values.int
hashCode()
boolean
isAdded(NodeId nodeId)
Returns if the specified node is introduced in the new value.boolean
isRemoved(NodeId nodeId)
Returns if the specified node is removed in the new value.Partition
newValue()
Returns the new partition value.Partition
oldValue()
Returns the old partition value.PartitionId
partitionId()
Returns the new partition identifier.String
toString()
-
-
-
Method Detail
-
partitionId
public PartitionId partitionId()
Returns the new partition identifier.- Returns:
- partition id
-
oldValue
public Partition oldValue()
Returns the old partition value.- Returns:
- partition
-
newValue
public Partition newValue()
Returns the new partition value.- Returns:
- partition
-
hasChanged
public boolean hasChanged()
Returns if there are differences between the two values.- Returns:
true
if yes;false
otherwise
-
isAdded
public boolean isAdded(NodeId nodeId)
Returns if the specified node is introduced in the new value.- Parameters:
nodeId
- node identifier- Returns:
true
if yes;false
otherwise
-
isRemoved
public boolean isRemoved(NodeId nodeId)
Returns if the specified node is removed in the new value.- Parameters:
nodeId
- node identifier- Returns:
true
if yes;false
otherwise
-
-