Class PartitionId

java.lang.Object
io.atomix.utils.AbstractIdentifier<Integer>
io.atomix.primitive.partition.PartitionId
All Implemented Interfaces:
io.atomix.utils.Identifier<Integer>, Comparable<PartitionId>

public class PartitionId
extends io.atomix.utils.AbstractIdentifier<Integer>
implements Comparable<PartitionId>
PartitionMetadata identifier.
  • Constructor Details

    • PartitionId

      public PartitionId​(String group, int id)
      Creates a partition identifier from an integer.
      Parameters:
      group - the group identifier
      id - input integer
  • Method Details

    • from

      public static PartitionId from​(String group, int id)
      Creates a partition identifier from an integer.
      Parameters:
      group - the group identifier
      id - input integer
      Returns:
      partition identification
    • compareTo

      public int compareTo​(PartitionId that)
      Specified by:
      compareTo in interface Comparable<PartitionId>
    • group

      public String group()
      Returns the partition group name.
      Returns:
      the partition group name
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class io.atomix.utils.AbstractIdentifier<Integer>
    • equals

      public boolean equals​(Object object)
      Overrides:
      equals in class io.atomix.utils.AbstractIdentifier<Integer>
    • toString

      public String toString()
      Overrides:
      toString in class io.atomix.utils.AbstractIdentifier<Integer>