|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectServerReservation
public class ServerReservation
This class represents a reservation on the resource side (Server Side). This class keeps track of the time for all activities in the Grid resource for a specific reservation. Among other things, it contains a Reservation object along with its arrival time and the ranges of PEs (Processing Element) allocated to it.
| Field Summary |
|---|
| Fields inherited from interface ScheduleItem |
|---|
TIME_UNIT_HOUR, TIME_UNIT_MINUTE, TIME_UNIT_SECOND |
| Constructor Summary | |
|---|---|
ServerReservation(Reservation reservation)
Creates a new ServerReservation object. |
|
| Method Summary | |
|---|---|
double |
getActualFinishTime()
Gets this object's finish time in seconds |
int |
getDurationTime()
Gets this object's duration time in seconds |
double |
getExpectedFinishTime()
Gets the reservation's expected finish time. |
double |
getExpiryTime()
Gets this object's expiry time |
int |
getID()
Gets this object's reservation ID |
int |
getNumPE()
Gets this object's number of PEs. |
int |
getNumRemainingPE()
Returns the number of PEs still available that have not been allocated to jobs |
int |
getPartitionID()
Gets the id of the partition or queue to which this reservation was scheduled |
PERangeList |
getPERangeList()
Gets the list of ranges of PEs used by this reservation |
int |
getPriority()
Gets the priority of this reservation assigned by the scheduler |
double |
getRemainingTime()
Gets the remaining time until the end of the reservation in seconds |
Reservation |
getReservation()
Returns the reservation sent by the requester, which led to the creation of this object. |
ReservationStatus |
getReservationStatus()
Gets the status of this reservation |
int |
getSenderID()
Gets this object's owner ID |
double |
getStartTime()
Gets this object's start time in seconds |
int |
getStatus()
Gets the status of this reservation |
double |
getSubmissionTime()
Returns the time of submission of this reservation |
boolean |
hasReserved()
If the item is a job, this checks whether the item is associated with an advance reservation or not |
boolean |
isAdvanceReservation()
Used to check if this schedule item is an advance reservation |
PERangeList |
selectPERangeList(int reqPE)
Selects a range of PEs to be used by a job that arrived to use this advance reservation |
boolean |
setDurationTime(int duration)
Sets the duration time (unit in seconds) for this reservation. |
void |
setExpiryTime(double expiryTime)
Sets a reservation expiry time. |
boolean |
setPartitionID(int partition)
Sets the id of the partition or queue to which this reservation was scheduled |
boolean |
setPERangeList(PERangeList rangeList)
Sets the ranges of PEs used by this reservation |
boolean |
setPriority(int priority)
Sets the priority of this reservation assigned by the scheduler |
boolean |
setStartTime(double startTime)
Sets the start time (in seconds) for this reservation. |
void |
setStatus(ReservationStatus status)
Sets the status of this reservation. |
boolean |
setSubmissionTime(double time)
Sets the time of submission of this reservation |
String |
toString()
Creates a String representation of this reservation for debugging purposes |
String |
toString(int timeUnit)
Creates a String representation of this reservation for displaying purposes |
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public ServerReservation(Reservation reservation)
ServerReservation object.
reservation - the reservation that this object
represents. That is, the reservation sent by a requester| Method Detail |
|---|
public Reservation getReservation()
public boolean isAdvanceReservation()
isAdvanceReservation in interface ScheduleItemtrue as it is an advance reservationpublic boolean setPERangeList(PERangeList rangeList)
rangeList - the range of PEs
true if the range has been set or
false otherwise.public PERangeList getPERangeList()
getPERangeList in interface ScheduleItempublic int getNumRemainingPE()
public PERangeList selectPERangeList(int reqPE)
reqPE - the number of PEs required.
null if no
range suitable is found.public int getPartitionID()
getPartitionID in interface ScheduleItem-1 if not foundpublic boolean setPartitionID(int partition)
partition - the partition id
true if set correctly; false otherwise.public int getPriority()
getPriority in interface ScheduleItem-1 if not foundpublic boolean setPriority(int priority)
priority - the priority
true if set correctly; false otherwise.public boolean setSubmissionTime(double time)
time - the submission time
true if the time has been set or
false otherwise.public double getSubmissionTime()
getSubmissionTime in interface ScheduleItempublic boolean setStartTime(double startTime)
startTime - the reservation start time in seconds
true if successful; false otherwisepublic boolean setDurationTime(int duration)
duration - the reservation duration time. Time unit is in seconds.
true if successful; false otherwisepublic void setExpiryTime(double expiryTime)
Reservation object.
expiryTime - the reservation expiry timepublic void setStatus(ReservationStatus status)
status - this reservation's statuspublic int getSenderID()
getSenderID in interface ScheduleItempublic double getStartTime()
getStartTime in interface ScheduleItempublic double getActualFinishTime()
getActualFinishTime in interface ScheduleItempublic double getExpectedFinishTime()
getExpectedFinishTime in interface ScheduleItempublic int getDurationTime()
public double getRemainingTime()
public int getNumPE()
getNumPE in interface ScheduleItempublic int getStatus()
getStatus in interface ScheduleItempublic ReservationStatus getReservationStatus()
public int getID()
getID in interface ScheduleItempublic double getExpiryTime()
public String toString(int timeUnit)
toString in interface ScheduleItemtimeUnit - the time unit to be used
ScheduleItem.TIME_UNIT_SECOND,
ScheduleItem.TIME_UNIT_MINUTE,
ScheduleItem.TIME_UNIT_HOURpublic String toString()
toString in class Objectpublic boolean hasReserved()
hasReserved in interface ScheduleItemtrue
|
GridSim 5.0 beta | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||