Class DefaultPartition

  • All Implemented Interfaces:
    Partition

    public class DefaultPartition
    extends java.lang.Object
    implements Partition
    Default Partition implementation.
    • Constructor Detail

      • DefaultPartition

        protected DefaultPartition()
        Constructs an empty partition for the serializer.
      • DefaultPartition

        public DefaultPartition​(PartitionId id,
                                java.util.Collection<NodeId> members)
        Constructs a partition.
        Parameters:
        id - partition identifier
        members - 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.
        Specified by:
        getId in interface Partition
        Returns:
        partition identifier
      • getMembers

        public java.util.Collection<NodeId> getMembers()
        Description copied from interface: Partition
        Returns the controller nodes that are members of this partition.
        Specified by:
        getMembers in interface Partition
        Returns:
        collection of controller node identifiers
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • 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