|
GridSim v3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Objectgridsim.Gridlet
A Gridlet is a package that contains all the information related to the job and its execution management details such as job length expressed in MI (Millions Instruction), disk I/O operations, the size of input and output files, and the job originator.
These basic parameters help in determining execution time, the time required to transport input and output files between users and remote resources, and returning the processed Gridlets back to the originator along with the results.
From GridSim 3.1, we have also added a classtype attributed which can be used to provide differentiated service to gridlets. The GridResource should check for classType and provide appropriate service if differentiated services are to be provided. Individual users model their application by creating Gridlets for processing them on Grid resources.
Field Summary | |
static int |
CANCELED
The Gridlet has been canceled. |
static int |
CREATED
The Gridlet has been created and added to the GridletList object |
static int |
FAILED
The Gridlet is failed |
static int |
INEXEC
The Gridlet is in execution in a Grid node |
static int |
PAUSED
The Gridlet has been paused. |
static int |
QUEUED
The Gridlet has moved to a Grid node |
static int |
READY
The Gridlet has been assigned to a GridResource object as planned |
static int |
RESUMED
The Gridlet has been resumed from PAUSED state. |
static int |
SUCCESS
The Gridlet has been executed successfully |
Constructor Summary | |
Gridlet(int gridletID,
double gridletLength,
long gridletFileSize,
long gridletOutputSize)
Allocates a new Gridlet object. |
|
Gridlet(int gridletID,
double gridletLength,
long gridletFileSize,
long gridletOutputSize,
int classType)
Allocates a new Gridlet object. |
Method Summary | |
double |
getActualCPUTime()
Gets the total execution time of this Gridlet from the latest GridResource |
double |
GetActualCPUTime()
Deprecated. As of GridSim 2.1, replaced by getActualCPUTime() |
double |
getActualCPUTime(int resId)
Gets the total execution time of this Gridlet in a given GridResource ID |
int[] |
getAllResourceID()
Gets all the GridResource IDs that executed this Gridlet |
String[] |
getAllResourceName()
Gets all the GridResource names that executed this Gridlet |
int |
getClassType()
Gets the classtype of this gridlet |
double |
getCostPerSec()
Gets the cost running this Gridlet in the latest GridResource |
double |
GetCostPerSec()
Deprecated. As of GridSim 2.1, replaced by getCostPerSec() |
double |
getCostPerSec(int resId)
Gets the cost running this Gridlet in a given GridResource ID |
double |
getExecStartTime()
Gets the latest execution start time |
double |
getFinishTime()
Gets the finish time of this Gridlet in a GridResource |
double |
GetFinishTime()
Deprecated. As of GridSim 2.1, replaced by getFinishTime() |
long |
getGridletFileSize()
Gets the input file size of this Gridlet BEFORE submitting to a GridResource |
long |
GetGridletFileSize()
Deprecated. As of GridSim 2.1, replaced by getGridletFileSize() |
double |
getGridletFinishedSoFar()
Gets the length of this Gridlet that has been executed so far from the latest GridResource. |
double |
getGridletFinishedSoFar(int resId)
Gets the length of this Gridlet that has been executed so far in a given GridResource ID. |
String |
getGridletHistory()
Gets the history of this Gridlet. |
int |
getGridletID()
Gets the Gridlet ID |
int |
GetGridletID()
Deprecated. As of GridSim 2.1, replaced by getGridletID() |
double |
getGridletLength()
Gets the length of this Gridlet |
double |
GetGridletLength()
Deprecated. As of GridSim 2.1, replaced by getGridletLength() |
long |
getGridletOutputSize()
Gets the output size of this Gridlet AFTER submitting and executing to a GridResource |
long |
GetGridletOutputSize()
Deprecated. As of GridSim 2.1, replaced by getGridletOutputSize() |
int |
getGridletStatus()
Gets the status code of this Gridlet |
String |
getGridletStatusString()
Gets the string representation of the current Gridlet status code |
int |
getNumPE()
Gets the number of PEs required to run this Gridlet |
double |
getProcessingCost()
Gets the total cost of processing or executing this Gridlet Processing Cost = actual CPU Time * cost per sec |
double |
GetProcessingCost()
Deprecated. As of GridSim 2.1, replaced by getProcessingCost() |
int |
getResourceID()
Gets the latest resource ID that processes this Gridlet |
int |
GetResourceID()
Deprecated. As of GridSim 2.1, replaced by getResourceID() |
String |
getResourceName(int resId)
Gets the GridResource name based on its ID |
int |
GetStatus()
Deprecated. As of GridSim 2.1, replaced by getGridletStatus() |
String |
GetStatusString()
Deprecated. As of GridSim 2.1, replaced by getGridletStatusString() |
static String |
getStatusString(int status)
Gets the string representation of the given Gridlet status code |
double |
getSubmissionTime()
Gets the submission or arrival time of this Gridlet from the latest GridResource |
double |
getSubmissionTime(int resId)
Gets the submission or arrival time of this Gridlet in the given GridResource ID |
int |
getUserID()
Gets the user or owner ID of this Gridlet |
int |
GetUserID()
Deprecated. As of GridSim 2.1, replaced by getUserID() |
double |
getWallClockTime()
Gets the time of this Gridlet resides in the latest GridResource (from arrival time until departure time). |
double |
GetWallClockTime()
Deprecated. As of GridSim 2.1, replaced by getWallClockTime() |
double |
getWallClockTime(int resId)
Gets the time of this Gridlet resides in a given GridResource ID (from arrival time until departure time). |
boolean |
isFinished()
Checks whether this Gridlet has finished execution or not |
boolean |
setClassType(int classType)
Sets the classType of this Gridlet. |
void |
setExecParam(double wallTime,
double actualTime)
Sets this Gridlet's execution parameters. |
void |
SetExecParam(double wallClockTime,
double actualCPUTime)
Deprecated. As of GridSim 2.1, replaced by setExecParam(double, double) |
void |
setExecStartTime(double clockTime)
Sets the execution start time of this Gridlet inside a GridResource. |
void |
SetExecStartTime(double clockTime)
Deprecated. As of GridSim 2.1, replaced by setExecStartTime(double) |
void |
setGridletFinishedSoFar(double length)
Sets the length of this Gridlet that has been executed so far. |
void |
setGridletStatus(int newStatus)
Sets the status code of this Gridlet |
boolean |
setNumPE(int numPE)
Sets the number of PEs required to run this Gridlet |
void |
setResourceParameter(int resourceID,
double cost)
Sets the resource parameters for which this Gridlet is going to be executed. |
void |
SetResParam(int resourceID,
double costPerSec)
Deprecated. As of GridSim 2.1, replaced by setResourceParameter(int, double) |
void |
SetStatus(int status)
Deprecated. As of GridSim 2.1, replaced by setGridletStatus(int) |
void |
setSubmissionTime(double clockTime)
Sets the submission or arrival time of this Gridlet into a GridResource |
void |
SetSubmissionTime(double clockTime)
Deprecated. As of GridSim 2.1, replaced by setSubmissionTime(double) |
void |
setUserID(int id)
Sets the user or owner ID of this Gridlet. |
void |
SetUserID(int id)
Deprecated. As of GridSim 2.1, replaced by setUserID(int) |
Methods inherited from class Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int CREATED
public static final int READY
public static final int QUEUED
public static final int INEXEC
public static final int SUCCESS
public static final int FAILED
public static final int CANCELED
public static final int PAUSED
public static final int RESUMED
Constructor Detail |
public Gridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize, int classType)
gridletID
- the unique ID of this GridletgridletLength
- the length or size of this Gridlet to be
executed in a GridResourcegridletFileSize
- the file size of this Gridlet
BEFORE submitting to a GridResourcegridletOutputSize
- the file size of this Gridlet
AFTER finish executing by
a GridResourceclassType
- Sets the classType of this gridlet.public Gridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize)
gridletID
- the unique ID of this GridletgridletLength
- the length or size of this Gridlet to be
executed in a GridResourcegridletFileSize
- the file size of this Gridlet
BEFORE submitting to a GridResourcegridletOutputSize
- the file size of this Gridlet
AFTER finish executing by
a GridResourceMethod Detail |
public boolean setClassType(int classType)
classType
- classType of this Gridlet
public int getClassType()
public boolean setNumPE(int numPE)
numPE
- number of PE
public int getNumPE()
public String getGridletHistory()
public double getGridletFinishedSoFar()
public boolean isFinished()
public void setGridletFinishedSoFar(double length)
length
- length of this GridletAllocPolicy
,
ResGridlet
public int GetGridletID()
getGridletID()
public int getGridletID()
public void SetUserID(int id)
setUserID(int)
id
- the user IDpublic void setUserID(int id)
id
- the user IDpublic int GetUserID()
getUserID()
public int getUserID()
public int GetResourceID()
getResourceID()
public int getResourceID()
public long GetGridletFileSize()
getGridletFileSize()
public long getGridletFileSize()
public long GetGridletOutputSize()
getGridletOutputSize()
public long getGridletOutputSize()
public void SetResParam(int resourceID, double costPerSec)
setResourceParameter(int, double)
resourceID
- the GridResource IDcostPerSec
- the cost running this GridResource per secondpublic void setResourceParameter(int resourceID, double cost)
resourceID
- the GridResource IDcost
- the cost running this GridResource per secondpublic void SetSubmissionTime(double clockTime)
setSubmissionTime(double)
clockTime
- the submission timepublic void setSubmissionTime(double clockTime)
clockTime
- the submission timepublic double getSubmissionTime()
public void SetExecStartTime(double clockTime)
setExecStartTime(double)
clockTime
- the latest execution start timepublic void setExecStartTime(double clockTime)
clockTime
- the latest execution start timepublic double getExecStartTime()
public void SetExecParam(double wallClockTime, double actualCPUTime)
setExecParam(double, double)
wallClockTime
- the time of this Gridlet resides in
a GridResource (from arrival time until
departure time).actualCPUTime
- the total execution time of this Gridlet in a
GridResource.public void setExecParam(double wallTime, double actualTime)
wallTime
- the time of this Gridlet resides in
a GridResource (from arrival time until
departure time).actualTime
- the total execution time of this Gridlet in a
GridResource.public void SetStatus(int status) throws Exception
setGridletStatus(int)
status
- the status code of this Gridlet
Exception
- Invalid Gridlet statuspublic void setGridletStatus(int newStatus) throws Exception
newStatus
- the status code of this Gridlet
Exception
- Invalid range of Gridlet statuspublic int GetStatus()
getGridletStatus()
public int getGridletStatus()
public String GetStatusString()
getGridletStatusString()
public String getGridletStatusString()
public static String getStatusString(int status)
status
- the Gridlet status code
public double GetGridletLength()
getGridletLength()
public double getGridletLength()
public double GetActualCPUTime()
getActualCPUTime()
public double getActualCPUTime()
public double GetCostPerSec()
getCostPerSec()
public double getCostPerSec()
public double GetProcessingCost()
getProcessingCost()
getActualCPUTime()
,
getCostPerSec()
public double getProcessingCost()
getActualCPUTime()
,
getCostPerSec()
public double GetWallClockTime()
getWallClockTime()
public double getWallClockTime()
public String[] getAllResourceName()
public int[] getAllResourceID()
public double getActualCPUTime(int resId)
resId
- a GridResource entity ID
public double getCostPerSec(int resId)
resId
- a GridResource entity ID
public double getGridletFinishedSoFar(int resId)
resId
- a GridResource entity ID
public double getSubmissionTime(int resId)
resId
- a GridResource entity ID
public double getWallClockTime(int resId)
resId
- a GridResource entity ID
public String getResourceName(int resId)
resId
- a GridResource entity ID
public double GetFinishTime()
getFinishTime()
public double getFinishTime()
|
GridSim v3.2 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |