public class PartitionId extends Identifier<java.lang.Integer> implements java.lang.Comparable<PartitionId>
Partition identifier.| Modifier and Type | Field and Description |
|---|---|
static PartitionId |
SHARED
The
PartitionId for the shared coordination partition. |
identifier| Constructor and Description |
|---|
PartitionId(int id)
Creates a partition identifier from an integer.
|
| Modifier and Type | Method and Description |
|---|---|
int |
asInt()
Returns the partition identifier as an integer.
|
int |
compareTo(PartitionId that) |
static PartitionId |
from(int id)
Creates a partition identifier from an integer.
|
equals, hashCode, id, toStringpublic static final PartitionId SHARED
PartitionId for the shared coordination partition.public PartitionId(int id)
id - input integerpublic static PartitionId from(int id)
id - input integerpublic int asInt()
public int compareTo(PartitionId that)
compareTo in interface java.lang.Comparable<PartitionId>