Class ReservationInterval
java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationInterval
- All Implemented Interfaces:
Comparable<ReservationInterval>
This represents the time duration of the reservation
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcompareTo(ReservationInterval anotherInterval) booleanlongGet the end time of the reservation intervallongGet the start time of the reservation intervalinthashCode()booleanisOverlap(long tick) Returns whether the interval is active at the specified instant of timetoString()
-
Constructor Details
-
ReservationInterval
public ReservationInterval(long startTime, long endTime)
-
-
Method Details
-
getStartTime
public long getStartTime()Get the start time of the reservation interval- Returns:
- the startTime
-
getEndTime
public long getEndTime()Get the end time of the reservation interval- Returns:
- the endTime
-
isOverlap
public boolean isOverlap(long tick) Returns whether the interval is active at the specified instant of time- Parameters:
tick- the instance of the time to check- Returns:
- true if active, false otherwise
-
compareTo
- Specified by:
compareToin interfaceComparable<ReservationInterval>
-
hashCode
public int hashCode() -
equals
-
toString
-