java.lang.Comparable<ReservationId>@Public @Unstable public abstract class ReservationId extends java.lang.Object implements java.lang.Comparable<ReservationId>
ReservationId represents the globally unique identifier for
a reservation.
The globally unique nature of the identifier is achieved by using the
cluster timestamp i.e. start-time of the ResourceManager
along with a monotonically increasing counter for the reservation.
| Modifier and Type | Field | Description |
|---|---|---|
protected long |
clusterTimestamp |
|
protected long |
id |
|
static java.lang.String |
reserveIdStrPrefix |
| Constructor | Description |
|---|---|
ReservationId() |
| Modifier and Type | Method | Description |
|---|---|---|
protected abstract void |
build() |
|
int |
compareTo(ReservationId other) |
|
boolean |
equals(java.lang.Object obj) |
|
abstract long |
getClusterTimestamp() |
Get the start time of the
ResourceManager which is used to
generate globally unique ReservationId. |
abstract long |
getId() |
Get the long identifier of the
ReservationId which is unique for
all Reservations started by a particular instance of the
ResourceManager. |
int |
hashCode() |
|
static ReservationId |
newInstance(long clusterTimestamp,
long id) |
|
static ReservationId |
parseReservationId(java.lang.String reservationId) |
Parse the string argument as a
ReservationId |
protected abstract void |
setClusterTimestamp(long clusterTimestamp) |
|
protected abstract void |
setId(long id) |
|
java.lang.String |
toString() |
@Private @Unstable public static final java.lang.String reserveIdStrPrefix
protected long clusterTimestamp
protected long id
@Private @Unstable public static ReservationId newInstance(long clusterTimestamp, long id)
@Public @Unstable public abstract long getId()
ReservationId which is unique for
all Reservations started by a particular instance of the
ResourceManager.ReservationId@Private @Unstable protected abstract void setId(long id)
@Public @Unstable public abstract long getClusterTimestamp()
ResourceManager which is used to
generate globally unique ReservationId.ResourceManager@Private @Unstable protected abstract void setClusterTimestamp(long clusterTimestamp)
protected abstract void build()
public int compareTo(ReservationId other)
compareTo in interface java.lang.Comparable<ReservationId>public java.lang.String toString()
toString in class java.lang.Object@Public @Unstable public static ReservationId parseReservationId(java.lang.String reservationId) throws java.io.IOException
ReservationIdreservationId - the string representation of the ReservationIdReservationId corresponding to the input string if
valid, null if input is nulljava.io.IOException - if unable to parse the input stringpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectCopyright © 2008–2025 Apache Software Foundation. All rights reserved.