|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object Reservation
public class Reservation
This class represents a reservation and its properties.
Constructor Summary | |
---|---|
Reservation(int userID)
Allocates a new Reservation object |
|
Reservation(String userName)
Allocates a new Reservation object |
Method Summary | |
---|---|
Reservation |
clone()
Returns a clone of this object |
int |
compareTo(Reservation reservation)
Compares this reservation with the specified reservation for order. |
boolean |
copy(Reservation obj)
Copy the object. |
int |
getDurationTime()
Gets this object's duration time in seconds |
String |
getEntityName()
Gets this object's owner name |
double |
getFinishTime()
Gets this object's finish time in seconds |
int |
getID()
Gets this object's reservation ID |
int |
getNumPE()
Gets this object's number of PEs. |
Collection<TimeSlot> |
getReservationOptions()
Gets the reservation options given by the Grid resource |
int |
getResourceID()
Gets this object's resource ID. |
double |
getStartTime()
Gets this object's start time in seconds |
ReservationStatus |
getStatus()
Gets the status of this reservation |
double |
getSubmissionTime()
Returns the time of submission of this reservation |
int |
getUserID()
Gets this object's owner ID |
boolean |
setDurationTime(int duration)
Sets the duration time (unit in seconds) for this reservation. |
boolean |
setNumPE(int numPE)
Sets the number of PEs (Processing Elements) required by this reservation |
void |
setReservationOptions(Collection<TimeSlot> resOptions)
Sets the reservation options given by the Grid resource |
boolean |
setResourceID(int id)
Sets the resource ID for sending this reservation object. |
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 the reservation for debugging purposes. |
Methods inherited from class Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Reservation(String userName)
userName
- an entity name that owns this reservation objectpublic Reservation(int userID)
userID
- an entity ID that owns this reservation objectMethod Detail |
---|
public boolean setSubmissionTime(double time)
time
- the submission time
true
if the time has been set or
false
otherwise.public double getSubmissionTime()
public boolean copy(Reservation obj)
null
, then copy failed.
obj
- a Reservation object
true
if successful, false
otherwisepublic 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 boolean setNumPE(int numPE)
numPE
- number of PEs required
true
if successful, false
otherwisepublic int getUserID()
public String getEntityName()
public double getStartTime()
public double getFinishTime()
public int getDurationTime()
public int getNumPE()
public int getResourceID()
public boolean setResourceID(int id)
id
- a resource ID
true
if successful, false
otherwisepublic void setStatus(ReservationStatus status)
status
- this reservation statuspublic ReservationStatus getStatus()
public int getID()
public Collection<TimeSlot> getReservationOptions()
public void setReservationOptions(Collection<TimeSlot> resOptions)
resOptions
- the reservation options objectpublic Reservation clone()
clone
in class Object
public int compareTo(Reservation reservation)
compareTo
in interface Comparable<Reservation>
reservation
- the reservation against which this reservation
has to be compared
public String toString()
toString
in class Object
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |