|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object SSGridlet
public class SSGridlet
SSGridlet
represents a Gridlet submitted to a
ParallelResource
for processing (i.e. Server Side).
This class keeps track of the time for all activities in the
ParallelResource
for a specific Gridlet. Before a Gridlet exits
the GridResource, it is RECOMMENDED to call this method finalizeGridlet()
.
It contains a Gridlet 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 | |
---|---|
|
SSGridlet(Gridlet gridlet)
Allocates a new object upon the arrival of a Gridlet object. |
protected |
SSGridlet(SSGridlet original)
Creates a clone of the original gridlet object. |
Method Summary | |
---|---|
void |
finalizeGridlet()
Finalises all relevant information before exiting the GridResource entity. |
double |
getActualFinishTime()
Gets the Gridlet's finish time |
double |
getArrivalTime()
Gets arrival time of a gridlet |
int |
getClassType()
Gets the Gridlet's class type |
double |
getExecStartTime()
Gets the Gridlet's execution start time |
double |
getExpectedFinishTime()
Gets the gridlet's expected finish time. |
Gridlet |
getGridlet()
Gets this Gridlet object |
int |
getID()
Gets this Gridlet entity Id |
double |
getLength()
Gets the Gridlet's length |
int |
getNumPE()
Gets the number of PEs required to execute this Gridlet. |
int |
getPartitionID()
Gets the id of the partition or queue to which this gridlet was scheduled |
PERangeList |
getPERangeList()
Gets the list of ranges of PEs used by this Gridlet |
int |
getPriority()
Gets the priority of this gridlet assigned by the scheduler |
double |
getRemainingLength()
Gets the remaining gridlet length |
int |
getReservationID()
Gets the reservation ID that owns this Gridlet |
int |
getSenderID()
Gets the user or owner of this Gridlet |
double |
getStartTime()
Gets the time that a Gridlet is supposed to start. |
int |
getStatus()
Gets the Gridlet status |
double |
getSubmissionTime()
Gets the submission or arrival time of this Gridlet from the latest GridResource |
boolean |
hasReserved()
Checks whether this Gridlet is submitted by reserving or not. |
boolean |
isAdvanceReservation()
Checks if this object is an advance reservation or not |
void |
setActualFinishTime(double time)
Sets the actual finish time for this Gridlet. |
void |
setExpectedFinishTime(double time)
Sets the item's expected finish time. |
boolean |
setPartitionID(int partition)
Sets the id of the partition or queue to which this gridlet was scheduled |
void |
setPERangeList(PERangeList rangeList)
Sets the ranges of PEs used by this Gridlet |
boolean |
setPriority(int priority)
Sets the priority of this gridlet assigned by the scheduler |
void |
setStartTime(double startTime)
Sets the time that a Gridlet is supposed to start. |
boolean |
setStatus(int status)
Sets the Gridlet status. |
String |
toString()
Creates a String representation of this Gridlet for debugging purposes |
String |
toString(int timeUnit)
Creates a String representation of this Gridlet for displaying purposes |
void |
updateGridletFinishedSoFar(double miLength)
A method that updates the length of gridlet that has been completed |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SSGridlet(Gridlet gridlet)
GridSim.clock()
.
gridlet
- a gridlet objectGridSim.clock()
protected SSGridlet(SSGridlet original)
original
- the original objectMethod Detail |
---|
public double getStartTime()
getStartTime
in interface ScheduleItem
public void setStartTime(double startTime)
startTime
- the potential start timepublic int getNumPE()
getNumPE
in interface ScheduleItem
public int getReservationID()
public boolean hasReserved()
hasReserved
in interface ScheduleItem
true
if this Gridlet has reserved before,
false
otherwisepublic boolean isAdvanceReservation()
isAdvanceReservation
in interface ScheduleItem
false
indicating that it is notpublic int getID()
getID
in interface ScheduleItem
public int getSenderID()
getSenderID
in interface ScheduleItem
public double getLength()
public int getClassType()
public boolean setStatus(int status)
status
- the Gridlet status
true
if the new status has been set, false
otherwisepublic double getExecStartTime()
public void setPERangeList(PERangeList rangeList)
rangeList
- the range of PEspublic PERangeList getPERangeList()
getPERangeList
in interface ScheduleItem
public int getPartitionID()
getPartitionID
in interface ScheduleItem
-1
if not foundpublic boolean setPartitionID(int partition)
partition
- the partition id
true
if set correctly or false
otherwise.public int getPriority()
getPriority
in interface ScheduleItem
-1
if not foundpublic boolean setPriority(int priority)
priority
- the priority
true
if set correctly or false
otherwise.public double getRemainingLength()
public void finalizeGridlet()
public void updateGridletFinishedSoFar(double miLength)
miLength
- gridlet length in Million Instructions (MI)public double getArrivalTime()
public double getSubmissionTime()
getSubmissionTime
in interface ScheduleItem
0.0
if nonepublic void setActualFinishTime(double time)
time
- finish timepublic void setExpectedFinishTime(double time)
time
- the expected finish timepublic double getActualFinishTime()
getActualFinishTime
in interface ScheduleItem
-1.0
if
it cannot finish in this hourly slotpublic double getExpectedFinishTime()
getExpectedFinishTime
in interface ScheduleItem
public Gridlet getGridlet()
public int getStatus()
getStatus
in interface ScheduleItem
public String toString()
toString
in class Object
public String toString(int timeUnit)
toString
in interface ScheduleItem
timeUnit
- the time unit to be used
ScheduleItem.TIME_UNIT_SECOND
,
ScheduleItem.TIME_UNIT_MINUTE
,
ScheduleItem.TIME_UNIT_HOUR
|
GridSim 5.0 beta | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |