Package io.atomix.primitive.partition
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 Summary
Constructors Constructor Description PartitionId(String group, int id)Creates a partition identifier from an integer. -
Method Summary
-
Constructor Details
-
PartitionId
Creates a partition identifier from an integer.- Parameters:
group- the group identifierid- input integer
-
-
Method Details
-
from
Creates a partition identifier from an integer.- Parameters:
group- the group identifierid- input integer- Returns:
- partition identification
-
compareTo
- Specified by:
compareToin interfaceComparable<PartitionId>
-
group
Returns the partition group name.- Returns:
- the partition group name
-
hashCode
public int hashCode()- Overrides:
hashCodein classio.atomix.utils.AbstractIdentifier<Integer>
-
equals
- Overrides:
equalsin classio.atomix.utils.AbstractIdentifier<Integer>
-
toString
- Overrides:
toStringin classio.atomix.utils.AbstractIdentifier<Integer>
-