java.lang.Object
org.apache.hadoop.yarn.server.resourcemanager.reservation.ReservationInterval
All Implemented Interfaces:
Comparable<ReservationInterval>

public class ReservationInterval extends Object implements Comparable<ReservationInterval>
This represents the time duration of the reservation
  • 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

      public int compareTo(ReservationInterval anotherInterval)
      Specified by:
      compareTo in interface Comparable<ReservationInterval>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object