public class NetworkCloudlet extends CloudletSimple
Please refer to following publication for more details:
Cloudlet.Status
NO_HISTORY_IS_RECORDED_FOR_CLOUDLET, NOT_ASSIGNED, NULL
Constructor and Description |
---|
NetworkCloudlet(int id,
long cloudletLength,
int pesNumber)
Creates a NetworkCloudlet with no priority and file size and output size equal to 1.
|
Modifier and Type | Method and Description |
---|---|
NetworkCloudlet |
addTask(CloudletTask task)
Adds a task to the
task list
and links the task to the NetworkCloudlet. |
CloudletTask |
getCurrentTask()
Gets the current task.
|
long |
getLength()
Gets the execution length of this Cloudlet (in Million Instructions (MI))
that will be executed in each defined PE.
|
long |
getMemory()
Gets the Cloudlet's RAM memory.
|
protected CloudletTask |
getNextTaskIfCurrentIfFinished()
Gets the next task in the list if the current task is finished.
|
double |
getNumberOfTasks() |
List<CloudletTask> |
getTasks() |
boolean |
isFinished()
Checks whether this Cloudlet has finished executing or not.
|
boolean |
isTasksStarted()
Checks if the some Cloudlet Task has started yet.
|
protected long |
numberOfExecutionTasks() |
boolean |
setFinishedLengthSoFar(long length)
Sets the length of this Cloudlet that has been executed so far (in MI),
according to the
Cloudlet.getLength() . |
NetworkCloudlet |
setMemory(long memory)
Sets the Cloudlet's RAM memory.
|
boolean |
startNextTaskIfCurrentIsFinished(double nextTaskStartTime)
Change the current task to the next one in order
to start executing it, if the current task is finished.
|
compareTo, toString
addOnFinishListener, addOnUpdateProcessingListener, addRequiredFile, addRequiredFiles, assignToDatacenter, deleteRequiredFile, equals, getAccumulatedBwCost, getActualCpuTime, getActualCpuTime, getArrivalTime, getBroker, getCostPerBw, getCostPerSec, getCostPerSec, getExecStartTime, getFileSize, getFinishedLengthSoFar, getFinishedLengthSoFar, getFinishTime, getHistory, getId, getLastDatacenter, getLastDatacenterArrivalTime, getLastExecutedDatacenterIdx, getNetServiceLevel, getNumberOfPes, getOutputSize, getPriority, getRequiredFiles, getSimulation, getStatus, getSubmissionDelay, getTotalCost, getTotalLength, getUid, getUtilizationModelBw, getUtilizationModelCpu, getUtilizationModelRam, getUtilizationOfBw, getUtilizationOfBw, getUtilizationOfCpu, getUtilizationOfCpu, getUtilizationOfRam, getUtilizationOfRam, getVm, getWaitingTime, getWallClockTime, getWallClockTimeInLastExecutedDatacenter, hashCode, isAssignedToDatacenter, isBindToVm, isRecordTransactionHistory, notifyOnUpdateProcessingListeners, registerArrivalInDatacenter, removeOnFinishListener, removeOnUpdateProcessingListener, requiresFiles, setAccumulatedBwCost, setBroker, setCostPerBw, setExecStartTime, setFileSize, setFinishTime, setId, setLastExecutedDatacenterIdx, setLength, setNetServiceLevel, setNumberOfPes, setOutputSize, setPriority, setRecordTransactionHistory, setRequiredFiles, setStatus, setSubmissionDelay, setUtilizationModel, setUtilizationModelBw, setUtilizationModelCpu, setUtilizationModelRam, setVm, setWallClockTime, write, write
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getUid
public NetworkCloudlet(int id, long cloudletLength, int pesNumber)
id
- the unique ID of this cloudletcloudletLength
- the length or size (in MI) of this cloudlet to be executed in a VMpesNumber
- the pes numberpublic double getNumberOfTasks()
public List<CloudletTask> getTasks()
public long getMemory()
public NetworkCloudlet setMemory(long memory)
memory
- amount of RAM to setpublic boolean isTasksStarted()
public boolean startNextTaskIfCurrentIsFinished(double nextTaskStartTime)
nextTaskStartTime
- the time that the next task will startpublic CloudletTask getCurrentTask()
protected CloudletTask getNextTaskIfCurrentIfFinished()
public boolean isFinished()
Cloudlet
isFinished
in interface Cloudlet
isFinished
in class CloudletAbstract
public long getLength()
According to this length and the power of the VM processor (in Million Instruction Per Second - MIPS) where the cloudlet will be run, the cloudlet will take a given time to finish processing. For instance, for a cloudlet of 10000 MI running on a processor of 2000 MIPS, the cloudlet will spend 5 seconds using the processor in order to be completed (that may be uninterrupted or not, depending on the scheduling policy).
The length of a NetworkCloudlet is the
length sum of all its CloudletExecutionTask
's.
getLength
in interface Cloudlet
getLength
in class CloudletAbstract
CloudletExecutionTask
'sCloudlet.getTotalLength()
,
Cloudlet.getNumberOfPes()
public boolean setFinishedLengthSoFar(long length)
Cloudlet
Cloudlet.getLength()
.setFinishedLengthSoFar
in interface Cloudlet
setFinishedLengthSoFar
in class CloudletAbstract
length
- executed length of this Cloudlet (in MI)CloudletExecution
public NetworkCloudlet addTask(CloudletTask task)
task list
and links the task to the NetworkCloudlet.task
- Task to be addedprotected long numberOfExecutionTasks()
Copyright © 2015–2018 Systems, Security and Image Communication Lab - Instituto de Telecomunicações (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO). All rights reserved.