org.apache.hadoop.yarn.server.resourcemanager.reservation
Class ReservationInterval

java.lang.Object
  extended by 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 Summary
ReservationInterval(long startTime, long endTime)
           
 
Method Summary
 int compareTo(ReservationInterval anotherInterval)
           
 boolean equals(Object obj)
           
 long getEndTime()
          Get the end time of the reservation interval
 long getStartTime()
          Get the start time of the reservation interval
 int hashCode()
           
 boolean isOverlap(long tick)
          Returns whether the interval is active at the specified instant of time
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReservationInterval

public ReservationInterval(long startTime,
                           long endTime)
Method Detail

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


Copyright © 2014 Apache Software Foundation. All Rights Reserved.