CloudletAbstract

public abstract class CloudletAbstract implements Cloudlet

A base class for Cloudlet implementations.

Author:Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho

Constructors

CloudletAbstract

public CloudletAbstract(long id, long length, long pesNumber)

Creates a Cloudlet with no priority and file size and output size equal to 1.

Parameters:
  • id – id of the Cloudlet
  • length – the length or size (in MI) of this cloudlet to be executed in a VM (check out setLength(long))
  • pesNumber – number of PEs that Cloudlet will require

CloudletAbstract

public CloudletAbstract(long length, int pesNumber)

Creates a Cloudlet with no priority or id. The id is defined when the Cloudlet is submitted to a DatacenterBroker. The file size and output size is defined as 1.

Parameters:
  • length – the length or size (in MI) of this cloudlet to be executed in a VM (check out setLength(long))
  • pesNumber – number of PEs that Cloudlet will require

CloudletAbstract

public CloudletAbstract(long length, long pesNumber)

Creates a Cloudlet with no priority or id. The id is defined when the Cloudlet is submitted to a DatacenterBroker. The file size and output size is defined as 1.

Parameters:
  • length – the length or size (in MI) of this cloudlet to be executed in a VM (check out setLength(long))
  • pesNumber – number of PEs that Cloudlet will require

Methods

absLength

protected long absLength()

Gets the absolute value of the length (without the signal). Check out getLength() for details.

addFinishedLengthSoFar

public boolean addFinishedLengthSoFar(long partialFinishedMI)

addOnFinishListener

public Cloudlet addOnFinishListener(EventListener<CloudletVmEventInfo> listener)

addOnUpdateProcessingListener

public Cloudlet addOnUpdateProcessingListener(EventListener<CloudletVmEventInfo> listener)

addRequiredFile

public boolean addRequiredFile(String fileName)

addRequiredFiles

public boolean addRequiredFiles(List<String> fileNames)

assignToDatacenter

public void assignToDatacenter(Datacenter datacenter)

deleteRequiredFile

public boolean deleteRequiredFile(String filename)

equals

public boolean equals(Object o)

getAccumulatedBwCost

public double getAccumulatedBwCost()

getActualCpuTime

public double getActualCpuTime(Datacenter datacenter)

getActualCpuTime

public double getActualCpuTime()

getArrivalTime

public double getArrivalTime(Datacenter datacenter)

getBroker

public DatacenterBroker getBroker()

getCostPerBw

public double getCostPerBw()

getCostPerSec

public double getCostPerSec()

getCostPerSec

public double getCostPerSec(Datacenter datacenter)

getExecStartTime

public double getExecStartTime()

getFileSize

public long getFileSize()

getFinishTime

public double getFinishTime()

getFinishedLengthSoFar

public long getFinishedLengthSoFar(Datacenter datacenter)

getFinishedLengthSoFar

public long getFinishedLengthSoFar()

getId

public long getId()

getJobId

public long getJobId()

getLastDatacenter

public Datacenter getLastDatacenter()

getLastDatacenterArrivalTime

public double getLastDatacenterArrivalTime()

getLastExecutedDatacenterIdx

protected int getLastExecutedDatacenterIdx()

getLength

public long getLength()

getNetServiceLevel

public int getNetServiceLevel()

getNumberOfPes

public long getNumberOfPes()

getOutputSize

public long getOutputSize()

getPriority

public int getPriority()

getRequiredFiles

public List<String> getRequiredFiles()

getSimulation

public Simulation getSimulation()

getStatus

public Status getStatus()

getSubmissionDelay

public double getSubmissionDelay()

getTotalCost

public double getTotalCost()

getTotalLength

public long getTotalLength()

getUid

public String getUid()

getUtilizationModelBw

public UtilizationModel getUtilizationModelBw()

getUtilizationModelCpu

public UtilizationModel getUtilizationModelCpu()

getUtilizationModelRam

public UtilizationModel getUtilizationModelRam()

getUtilizationOfBw

public double getUtilizationOfBw()

getUtilizationOfBw

public double getUtilizationOfBw(double time)

getUtilizationOfCpu

public double getUtilizationOfCpu()

getUtilizationOfCpu

public double getUtilizationOfCpu(double time)

getUtilizationOfRam

public double getUtilizationOfRam()

getUtilizationOfRam

public double getUtilizationOfRam(double time)

getVm

public Vm getVm()

getWaitingTime

public double getWaitingTime()

getWallClockTime

public double getWallClockTime(Datacenter datacenter)

getWallClockTimeInLastExecutedDatacenter

public double getWallClockTimeInLastExecutedDatacenter()

hashCode

public int hashCode()

isAssignedToDatacenter

public boolean isAssignedToDatacenter()

isBindToVm

public boolean isBindToVm()

isFinished

public boolean isFinished()

notifyOnUpdateProcessingListeners

public void notifyOnUpdateProcessingListeners(double time)

registerArrivalInDatacenter

public double registerArrivalInDatacenter()

removeOnFinishListener

public boolean removeOnFinishListener(EventListener<CloudletVmEventInfo> listener)

removeOnUpdateProcessingListener

public boolean removeOnUpdateProcessingListener(EventListener<CloudletVmEventInfo> listener)

requiresFiles

public boolean requiresFiles()

setAccumulatedBwCost

protected final void setAccumulatedBwCost(double accumulatedBwCost)

Sets the accumulated bw cost.

Parameters:
  • accumulatedBwCost – the accumulated bw cost to set

setBroker

public final Cloudlet setBroker(DatacenterBroker broker)

setCostPerBw

protected final void setCostPerBw(double costPerBw)

Sets the cost of each byte of bandwidth (bw) consumed.

Parameters:
  • costPerBw – the new cost per bw to set

setExecStartTime

public void setExecStartTime(double clockTime)

setFileSize

public final Cloudlet setFileSize(long fileSize)

setFinishTime

protected final void setFinishTime(double finishTime)

Sets the finish time of this cloudlet in the latest Datacenter.

Parameters:
  • finishTime – the finish time

setId

public final void setId(long id)

setJobId

public final void setJobId(long jobId)

setLastExecutedDatacenterIdx

protected void setLastExecutedDatacenterIdx(int lastExecutedDatacenterIdx)

setLength

public final Cloudlet setLength(long length)

setNetServiceLevel

public boolean setNetServiceLevel(int netServiceLevel)

setNumberOfPes

public final Cloudlet setNumberOfPes(long numberOfPes)

setOutputSize

public final Cloudlet setOutputSize(long outputSize)

setPriority

public void setPriority(int priority)

setRequiredFiles

public final void setRequiredFiles(List<String> requiredFiles)

Sets the list of required files.

Parameters:
  • requiredFiles – the new list of required files

setStatus

public boolean setStatus(Status newStatus)

setSubmissionDelay

public final void setSubmissionDelay(double submissionDelay)

setUtilizationModel

public Cloudlet setUtilizationModel(UtilizationModel utilizationModel)

setUtilizationModelBw

public final Cloudlet setUtilizationModelBw(UtilizationModel utilizationModelBw)

setUtilizationModelCpu

public final Cloudlet setUtilizationModelCpu(UtilizationModel utilizationModelCpu)

setUtilizationModelRam

public final Cloudlet setUtilizationModelRam(UtilizationModel utilizationModelRam)

setVm

public final Cloudlet setVm(Vm vm)

setWallClockTime

public boolean setWallClockTime(double wallTime, double actualCpuTime)