Class PartitionDiff


  • public class PartitionDiff
    extends java.lang.Object
    Utility for examining differences between two partition values.
    • Constructor Detail

    • 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
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object