@InterfaceAudience.Public @InterfaceStability.Unstable public abstract class ReservationId extends Object implements 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 and Description |
---|---|
protected long |
clusterTimestamp |
protected long |
id |
Constructor and Description |
---|
ReservationId() |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
build() |
int |
compareTo(ReservationId other) |
boolean |
equals(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 |
parseReservationId(String reservationId)
Parse the string argument as a
ReservationId |
String |
toString() |
protected long clusterTimestamp
protected long id
public ReservationId()
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract long getId()
ReservationId
which is unique for
all Reservations started by a particular instance of the
ResourceManager
.ReservationId
@InterfaceAudience.Public @InterfaceStability.Unstable public abstract long getClusterTimestamp()
ResourceManager
which is used to
generate globally unique ReservationId
.ResourceManager
protected abstract void build()
public int compareTo(ReservationId other)
compareTo
in interface Comparable<ReservationId>
@InterfaceAudience.Public @InterfaceStability.Unstable public static ReservationId parseReservationId(String reservationId) throws IOException
ReservationId
reservationId
- the string representation of the ReservationId
ReservationId
corresponding to the input string if
valid, null if input is nullIOException
- if unable to parse the input stringCopyright © 2015 Apache Software Foundation. All Rights Reserved.