|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object ARObject
public class ARObject
ARObject class represents a reservation object and its properties.
AdvanceReservation
class creates an object of this class,
then pass it to a resource. When a resource or its scheduler agrees to
accept this reservation, then it will set an unique reservation ID and expiry
time.
Constructor Summary | |
---|---|
ARObject(ARObject obj)
Copy constructor. |
|
ARObject(int userID)
Allocates a new ARObject object, with a default time zone from GridSim.getSimulationCalendar() method. |
|
ARObject(int userID,
double timeZone)
Allocates a new ARObject object. |
|
ARObject(String userName)
Allocates a new ARObject object, with a default time zone from GridSim.getSimulationCalendar() method. |
|
ARObject(String userName,
double timeZone)
Allocates a new ARObject object. |
Method Summary | |
---|---|
void |
addTotalGridlet(int num)
Adds the number of Gridlets executed by this reservation. |
boolean |
copy(ARObject obj)
Copy the object. |
static int |
getByteSize()
Determines the size of ARObject object |
int |
getDurationTime()
Gets this object's duration time in seconds |
String |
getEntityName()
Gets this object's owner name |
long |
getExpiryTime()
Gets this object's expiry time |
int |
getNumPE()
Gets this object's number of PEs. |
int |
getReservationID()
Gets this object's reservation ID |
int |
getResourceID()
Gets this object's resource ID. |
long |
getStartTime()
Gets this object's start time in milliseconds |
int |
getStatus()
Gets the status of this reservation |
double |
getTimeZone()
Gets this object's time zone based on GMT |
int |
getTotalGridlet()
Gets the total Gridlet executed by this reservation |
int |
getTransactionID()
Gets this object's transaction ID |
int |
getUserID()
Gets this object's owner ID |
boolean |
hasCommitted()
Checks whether this reservation object has committed or not. |
void |
reduceTotalGridlet()
Reduces total Gridlet executed by this reservation by one. |
void |
setCommitted()
Sets this object into a committed state. |
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 |
setReservation(int id,
long expiryTime)
Sets a reservation's attributes upon acceptance by a resource. |
boolean |
setResourceID(int id)
Sets the resource ID for sending this reservation object. |
boolean |
setStartTime(long startTime)
Sets the start time (in milliseconds) for this reservation. |
void |
setStatus(int status)
Sets the status of this reservation. |
boolean |
setTimeZone(double time)
Sets this reservation's time zone based on GMT. |
boolean |
setTransactionID(int id)
Sets a transaction ID for this reservation. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ARObject(ARObject obj)
obj
- ARObject objectpublic ARObject(String userName)
userName
- an entity name that owns this reservation objectGridSim.getSimulationCalendar()
public ARObject(String userName, double timeZone)
userName
- an entity name that owns this reservation objecttimeZone
- local time zone of a user that owns this reservation.
Time zone should be of range [GMT-12 ... GMT+13]public ARObject(int userID, double timeZone)
userID
- an entity ID that owns this reservation objecttimeZone
- local time zone of a user that owns this reservation.
Time zone should be of range [GMT-12 ... GMT+13]public ARObject(int userID)
userID
- an entity ID that owns this reservation objectGridSim.getSimulationCalendar()
Method Detail |
---|
public static int getByteSize()
public boolean copy(ARObject obj)
obj
- an ARObject object
public boolean setTransactionID(int id)
id
- a transaction ID
public boolean setStartTime(long startTime)
GridSim.init(int, Calendar, boolean)
startTime
- the reservation start time in milliseconds
GridSim.init(int, Calendar, boolean)
public boolean setDurationTime(int duration)
duration
- the reservation duration time. Time unit is in seconds.
public boolean setNumPE(int numPE)
numPE
- number of PEs required
public boolean setResourceID(int id)
id
- a resource ID
public boolean setTimeZone(double time)
time
- a valid time zone based on GMT
public int getUserID()
public String getEntityName()
public int getTransactionID()
public long getStartTime()
public int getDurationTime()
public int getNumPE()
public int getResourceID()
public double getTimeZone()
public int getTotalGridlet()
public void addTotalGridlet(int num)
num
- number of Gridletspublic void reduceTotalGridlet()
public void setReservation(int id, long expiryTime)
id
- an unique reservation idexpiryTime
- the reservation expiry timepublic void setStatus(int status)
status
- this reservation statuspublic void setCommitted()
public int getStatus()
public int getReservationID()
public long getExpiryTime()
public boolean hasCommitted()
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |