gridsim
Class Gridlet

Object
  |
  +--gridsim.Gridlet

public class Gridlet
extends Object

GridSim Gridlet class acts as job package that contains job length in Millions Instructions (MI), the length of input and output data in bytes, execution start and end time, and the originator of the job.

Individual users model their application by creating Gridlets for processing them on Grid resources assigned by scheduling entities (resource brokers).

Version:
2.1, June 2003
Author:
Manzur Murshed and Rajkumar Buyya
Invariant:
$none

Field Summary
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 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 SUCCESS
          The Gridlet has been executed successfully
 
Constructor Summary
Gridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize)
          Allocates a new Gridlet object
 
Method Summary
 double getActualCPUTime()
          Gets the CPU time
 double GetActualCPUTime()
          Deprecated. As of GridSim 2.1, replaced by getActualCPUTime()
 double getCostPerSec()
          Gets the cost associated with a resource
 double GetCostPerSec()
          Deprecated. As of GridSim 2.1, replaced by getCostPerSec()
 double getExecStartTime()
          Gets the execution start time
 double getFinishTime()
          Gets the time to complete processing a Gridlet
 double GetFinishTime()
          Deprecated. As of GridSim 2.1, replaced by getFinishTime()
 long getGridletFileSize()
          Gets the file size of a Gridlet
 long GetGridletFileSize()
          Deprecated. As of GridSim 2.1, replaced by getGridletFileSize()
 int getGridletID()
          Gets the Gridlet ID
 int GetGridletID()
          Deprecated. As of GridSim 2.1, replaced by getGridletID()
 double getGridletLength()
          Gets the length of a Gridlet
 double GetGridletLength()
          Deprecated. As of GridSim 2.1, replaced by getGridletLength()
 long getGridletOutputSize()
          Gets the output size of a Gridlet
 long GetGridletOutputSize()
          Deprecated. As of GridSim 2.1, replaced by getGridletOutputSize()
 int getGridletStatus()
          Gets the status code of a Gridlet
 String getGridletStatusString()
          Gets the string representation of the current Gridlet status code
 double getProcessingCost()
          Gets the cost of processing Gridlet
 double GetProcessingCost()
          Deprecated. As of GridSim 2.1, replaced by getProcessingCost()
 int getResourceID()
          Gets the resource ID
 int GetResourceID()
          Deprecated. As of GridSim 2.1, replaced by getResourceID()
 int GetStatus()
          Deprecated. As of GridSim 2.1, replaced by getGridletStatus()
 String GetStatusString()
          Deprecated. As of GridSim 2.1, replaced by getGridletStatusString()
 double getSubmissionTime()
          Gets the submission time
 int getUserID()
          Gets the user ID
 int GetUserID()
          Deprecated. As of GridSim 2.1, replaced by getUserID()
 double getWallClockTime()
          Gets the actual real time
 double GetWallClockTime()
          Deprecated. As of GridSim 2.1, replaced by getWallClockTime()
 void setExecParam(double wallClockTime, double actualCPUTime)
          Sets 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
 void SetExecStartTime(double clockTime)
          Deprecated. As of GridSim 2.1, replaced by setExecStartTime(double)
 void setGridletStatus(int status)
          Sets the status code of a Gridlet
 void setResourceParameter(int resourceID, double costPerSec)
          Sets the resource parameters
 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 time
 void SetSubmissionTime(double clockTime)
          Deprecated. As of GridSim 2.1, replaced by setSubmissionTime(double)
 void setUserID(int id)
          Sets the user ID
 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

CREATED

public static final int CREATED
The Gridlet has been created and added to the GridletList object

See Also:
Constant Field Values

READY

public static final int READY
The Gridlet has been assigned to a GridResource object as planned

See Also:
Constant Field Values

QUEUED

public static final int QUEUED
The Gridlet has moved to a Grid node

See Also:
Constant Field Values

INEXEC

public static final int INEXEC
The Gridlet is in execution in a Grid node

See Also:
Constant Field Values

SUCCESS

public static final int SUCCESS
The Gridlet has been executed successfully

See Also:
Constant Field Values

FAILED

public static final int FAILED
The Gridlet is failed

See Also:
Constant Field Values
Constructor Detail

Gridlet

public Gridlet(int gridletID,
               double gridletLength,
               long gridletFileSize,
               long gridletOutputSize)
Allocates a new Gridlet object

Parameters:
gridletID - the ID of a Gridlet
gridletLength - the length or size of a Gridlet
gridletFileSize - the file size of a Gridlet
gridletOutputSize - the output size of a Gridlet
Pre Condition:
gridletID >= 0, gridletLength >= 0.0, gridletFileSize >= 1, gridletOutputSize >= 1
Post Condition:
$none
Method Detail

GetGridletID

public int GetGridletID()
Deprecated. As of GridSim 2.1, replaced by getGridletID()

Gets the Gridlet ID

Returns:
the Gridlet ID
Pre Condition:
$none
Post Condition:
$result >= 0

getGridletID

public int getGridletID()
Gets the Gridlet ID

Returns:
the Gridlet ID
Pre Condition:
$none
Post Condition:
$result >= 0

SetUserID

public void SetUserID(int id)
Deprecated. As of GridSim 2.1, replaced by setUserID(int)

Sets the user ID

Parameters:
id - the user ID
Pre Condition:
id >= 0
Post Condition:
$none

setUserID

public void setUserID(int id)
Sets the user ID

Parameters:
id - the user ID
Pre Condition:
id >= 0
Post Condition:
$none

GetUserID

public int GetUserID()
Deprecated. As of GridSim 2.1, replaced by getUserID()

Gets the user ID

Returns:
the user ID or -1 if the user ID has not been set before
Pre Condition:
$none
Post Condition:
$result >= -1

getUserID

public int getUserID()
Gets the user ID

Returns:
the user ID or -1 if the user ID has not been set before
Pre Condition:
$none
Post Condition:
$result >= -1

GetResourceID

public int GetResourceID()
Deprecated. As of GridSim 2.1, replaced by getResourceID()

Gets the resource ID

Returns:
the resource ID
Pre Condition:
$none
Post Condition:
$result >= 0

getResourceID

public int getResourceID()
Gets the resource ID

Returns:
the resource ID
Pre Condition:
$none
Post Condition:
$result >= 0

GetGridletFileSize

public long GetGridletFileSize()
Deprecated. As of GridSim 2.1, replaced by getGridletFileSize()

Gets the file size of a Gridlet

Returns:
the Gridlet file size
Pre Condition:
$none
Post Condition:
$result >= 1

getGridletFileSize

public long getGridletFileSize()
Gets the file size of a Gridlet

Returns:
the Gridlet file size
Pre Condition:
$none
Post Condition:
$result >= 1

GetGridletOutputSize

public long GetGridletOutputSize()
Deprecated. As of GridSim 2.1, replaced by getGridletOutputSize()

Gets the output size of a Gridlet

Returns:
the Gridlet output size
Pre Condition:
$none
Post Condition:
$result >= 1

getGridletOutputSize

public long getGridletOutputSize()
Gets the output size of a Gridlet

Returns:
the Gridlet output size
Pre Condition:
$none
Post Condition:
$result >= 1

SetResParam

public void SetResParam(int resourceID,
                        double costPerSec)
Deprecated. As of GridSim 2.1, replaced by setResourceParameter(int, double)

Sets the resource parameters

Parameters:
resourceID - the resource ID
costPerSec - the costs associated with this resource
Pre Condition:
resourceID >= 0, costPerSec > 0.0
Post Condition:
$none

setResourceParameter

public void setResourceParameter(int resourceID,
                                 double costPerSec)
Sets the resource parameters

Parameters:
resourceID - the resource ID
costPerSec - the costs associated with this resource
Pre Condition:
resourceID >= 0, costPerSec > 0.0
Post Condition:
$none

SetSubmissionTime

public void SetSubmissionTime(double clockTime)
Deprecated. As of GridSim 2.1, replaced by setSubmissionTime(double)

Sets the submission time

Parameters:
clockTime - the submission time
Pre Condition:
clockTime >= 0.0
Post Condition:
$none

setSubmissionTime

public void setSubmissionTime(double clockTime)
Sets the submission time

Parameters:
clockTime - the submission time
Pre Condition:
clockTime >= 0.0
Post Condition:
$none

getSubmissionTime

public double getSubmissionTime()
Gets the submission time

Returns:
the submission time
Pre Condition:
$none
Post Condition:
$result >= 0.0

SetExecStartTime

public void SetExecStartTime(double clockTime)
Deprecated. As of GridSim 2.1, replaced by setExecStartTime(double)

Sets the execution start time

Parameters:
clockTime - the execution start time
Pre Condition:
clockTime >= 0.0
Post Condition:
$none

setExecStartTime

public void setExecStartTime(double clockTime)
Sets the execution start time

Parameters:
clockTime - the execution start time
Pre Condition:
clockTime >= 0.0
Post Condition:
$none

getExecStartTime

public double getExecStartTime()
Gets the execution start time

Returns:
the execution start time
Pre Condition:
$none
Post Condition:
$result >= 0.0

SetExecParam

public void SetExecParam(double wallClockTime,
                         double actualCPUTime)
Deprecated. As of GridSim 2.1, replaced by setExecParam(double, double)

Sets execution parameters. These two parameters are set by the GridResource after execution.

Parameters:
wallClockTime - the virtual real time
actualCPUTime - the time based on CPU time
Pre Condition:
wallClockTime >= 0.0, actualCPUTime >= 0.0
Post Condition:
$none

setExecParam

public void setExecParam(double wallClockTime,
                         double actualCPUTime)
Sets execution parameters. These two parameters are set by the GridResource after execution.

Parameters:
wallClockTime - the virtual real time
actualCPUTime - the time based on CPU time
Pre Condition:
wallClockTime >= 0.0, actualCPUTime >= 0.0
Post Condition:
$none

SetStatus

public void SetStatus(int status)
               throws Exception
Deprecated. As of GridSim 2.1, replaced by setGridletStatus(int)

Sets the status code of a Gridlet

Parameters:
status - the status code of a Gridlet
Throws:
Exception - Invalid Gridlet status
Pre Condition:
status >= 0 && status <= 5
Post Condition:
$none

setGridletStatus

public void setGridletStatus(int status)
                      throws Exception
Sets the status code of a Gridlet

Parameters:
status - the status code of a Gridlet
Throws:
Exception - Invalid Gridlet status
Pre Condition:
status >= 0 && status <= 5
Post Condition:
$none

GetStatus

public int GetStatus()
Deprecated. As of GridSim 2.1, replaced by getGridletStatus()

Gets the status code of a Gridlet

Returns:
the status code of a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0

getGridletStatus

public int getGridletStatus()
Gets the status code of a Gridlet

Returns:
the status code of a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0

GetStatusString

public String GetStatusString()
Deprecated. As of GridSim 2.1, replaced by getGridletStatusString()

Gets the string representation of the current Gridlet status code

Returns:
the Gridlet status code as a string or null if the status code is unknown
Pre Condition:
$none
Post Condition:
$none

getGridletStatusString

public String getGridletStatusString()
Gets the string representation of the current Gridlet status code

Returns:
the Gridlet status code as a string or null if the status code is unknown
Pre Condition:
$none
Post Condition:
$none

GetGridletLength

public double GetGridletLength()
Deprecated. As of GridSim 2.1, replaced by getGridletLength()

Gets the length of a Gridlet

Returns:
the length of a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0

getGridletLength

public double getGridletLength()
Gets the length of a Gridlet

Returns:
the length of a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0

GetActualCPUTime

public double GetActualCPUTime()
Deprecated. As of GridSim 2.1, replaced by getActualCPUTime()

Gets the CPU time

Returns:
the CPU time
Pre Condition:
$none
Post Condition:
$result >= 0.0

getActualCPUTime

public double getActualCPUTime()
Gets the CPU time

Returns:
the CPU time
Pre Condition:
$none
Post Condition:
$result >= 0.0

GetCostPerSec

public double GetCostPerSec()
Deprecated. As of GridSim 2.1, replaced by getCostPerSec()

Gets the cost associated with a resource

Returns:
the cost associated with a resource
Pre Condition:
$none
Post Condition:
$result >= 0.0

getCostPerSec

public double getCostPerSec()
Gets the cost associated with a resource

Returns:
the cost associated with a resource
Pre Condition:
$none
Post Condition:
$result >= 0.0

GetProcessingCost

public double GetProcessingCost()
Deprecated. As of GridSim 2.1, replaced by getProcessingCost()

Gets the cost of processing Gridlet

Returns:
the cost of processing Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0

getProcessingCost

public double getProcessingCost()
Gets the cost of processing Gridlet

Returns:
the cost of processing Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0

GetWallClockTime

public double GetWallClockTime()
Deprecated. As of GridSim 2.1, replaced by getWallClockTime()

Gets the actual real time

Returns:
the actual real time
Pre Condition:
$none
Post Condition:
$result >= 0.0

getWallClockTime

public double getWallClockTime()
Gets the actual real time

Returns:
the actual real time
Pre Condition:
$none
Post Condition:
$result >= 0.0

GetFinishTime

public double GetFinishTime()
Deprecated. As of GridSim 2.1, replaced by getFinishTime()

Gets the time to complete processing a Gridlet

Returns:
the time to complete processing a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0

getFinishTime

public double getFinishTime()
Gets the time to complete processing a Gridlet

Returns:
the time to complete processing a Gridlet
Pre Condition:
$none
Post Condition:
$result >= 0.0