GridSim 5.0 beta

gridsim.datagrid
Class DataGridlet

Object
  extended by Gridlet
      extended by DataGridlet

public class DataGridlet
extends Gridlet

A DataGridlet is an extension of the Gridlet class, which requires one or more data files to run.

Since:
GridSim Toolkit 4.0
Author:
Uros Cibej and Anthony Sulistio

Field Summary
 
Fields inherited from class Gridlet
CANCELED, CREATED, FAILED, FAILED_RESOURCE_UNAVAILABLE, INEXEC, PAUSED, QUEUED, READY, RESUMED, SUCCESS
 
Constructor Summary
DataGridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize, boolean record)
          Creates a new DataGridlet object.
DataGridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize, boolean record, LinkedList list)
          Creates a new DataGridlet object.
DataGridlet(int gridletID, double gridletLength, long gridletFileSize, long gridletOutputSize, LinkedList list)
          Creates a new DataGridlet object.
 
Method Summary
 boolean addRequiredFile(String fileName)
          Adds the required filename to the list
 boolean deleteRequiredFile(String filename)
          Deletes the given filename from the list
 LinkedList getRequiredFiles()
          Returns the list files that this gridlet needs for execution.
 boolean requiresFiles()
          Checks whether this gridlet requires any files or not
 
Methods inherited from class Gridlet
getActualCPUTime, getActualCPUTime, getAllResourceID, getAllResourceName, getClassType, getCostPerSec, getCostPerSec, getExecStartTime, getFinishTime, getGridletFileSize, getGridletFinishedSoFar, getGridletFinishedSoFar, getGridletHistory, getGridletID, getGridletLength, getGridletOutputSize, getGridletStatus, getGridletStatusString, getNetServiceLevel, getNumPE, getProcessingCost, getReservationID, getResourceID, getResourceName, getStatusString, getSubmissionTime, getSubmissionTime, getUserID, getWaitingTime, getWallClockTime, getWallClockTime, hasReserved, isFinished, setClassType, setExecParam, setExecStartTime, setGridletFinishedSoFar, setGridletLength, setGridletStatus, setNetServiceLevel, setNumPE, setReservationID, setResourceParameter, setSubmissionTime, setUserID, write
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataGridlet

public DataGridlet(int gridletID,
                   double gridletLength,
                   long gridletFileSize,
                   long gridletOutputSize,
                   LinkedList list)
Creates a new DataGridlet object. The gridlet length, input and output file sizes should be greater than or equal to 1. By default, this constructor records the history of this object.

Parameters:
gridletID - the unique ID of this Gridlet
gridletLength - the length or size (in MI) of this Gridlet to be executed in a GridResource
gridletFileSize - the file size (in byte) of this Gridlet BEFORE submitting to a GridResource
gridletOutputSize - the file size (in byte) of this Gridlet AFTER finish executing by a GridResource
list - a list of required filenames to execute this Gridlet

DataGridlet

public DataGridlet(int gridletID,
                   double gridletLength,
                   long gridletFileSize,
                   long gridletOutputSize,
                   boolean record,
                   LinkedList list)
Creates a new DataGridlet object. The gridlet length, input and output file sizes should be greater than or equal to 1.

Parameters:
gridletID - the unique ID of this Gridlet
gridletLength - the length or size (in MI) of this Gridlet to be executed in a GridResource
gridletFileSize - the file size (in byte) of this Gridlet BEFORE submitting to a GridResource
gridletOutputSize - the file size (in byte) of this Gridlet AFTER finish executing by a GridResource
record - record the history of this object or not
list - a list of required files to execute this Gridlet

DataGridlet

public DataGridlet(int gridletID,
                   double gridletLength,
                   long gridletFileSize,
                   long gridletOutputSize,
                   boolean record)
Creates a new DataGridlet object. The gridlet length, input and output file sizes should be greater than or equal to 1.

Parameters:
gridletID - the unique ID of this Gridlet
gridletLength - the length or size (in MI) of this Gridlet to be executed in a GridResource
gridletFileSize - the file size (in byte) of this Gridlet BEFORE submitting to a GridResource
gridletOutputSize - the file size (in byte) of this Gridlet AFTER finish executing by a GridResource
record - record the history of this object or not
Method Detail

getRequiredFiles

public LinkedList getRequiredFiles()
Returns the list files that this gridlet needs for execution.

Returns:
A list of required files or null if empty

addRequiredFile

public boolean addRequiredFile(String fileName)
Adds the required filename to the list

Parameters:
fileName - the required filename
Returns:
true if succesful, false otherwise

deleteRequiredFile

public boolean deleteRequiredFile(String filename)
Deletes the given filename from the list

Parameters:
filename - the given filename to be deleted
Returns:
true if succesful, false otherwise

requiresFiles

public boolean requiresFiles()
Checks whether this gridlet requires any files or not

Returns:
true if required, false otherwise

GridSim 5.0 beta

The University of Melbourne, Australia, 2009