Class PartitionDiff


  • public class PartitionDiff
    extends 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 Object