public class ResCloudlet
extends java.lang.Object
finalizeCloudlet().
It contains a Cloudlet object along with its arrival time and the ID of the machine and the Pe (Processing Element) allocated to it. It acts as a placeholder for maintaining the amount of resource share allocated at various times for simulating any scheduling using internal events.
| Constructor and Description |
|---|
ResCloudlet(Cloudlet cloudlet)
Allocates a new ResCloudlet object upon the arrival of a Cloudlet object.
|
ResCloudlet(Cloudlet cloudlet,
long startTime,
int duration,
int reservID)
Allocates a new ResCloudlet object upon the arrival of a Cloudlet object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
finalizeCloudlet()
Finalizes all relevant information before exiting the CloudResource entity.
|
double |
getClouddletFinishTime()
Gets the Cloudlet's finish time.
|
Cloudlet |
getCloudlet()
Gets this Cloudlet object.
|
double |
getCloudletArrivalTime()
Gets arrival time of a cloudlet.
|
int |
getCloudletClassType()
Gets the Cloudlet's class type.
|
int |
getCloudletId()
Gets this Cloudlet entity Id.
|
long |
getCloudletLength()
Gets the Cloudlet's length.
|
int |
getCloudletStatus()
Gets the Cloudlet status.
|
long |
getCloudletTotalLength()
Gets the total Cloudlet's length (across all PEs).
|
int |
getDurationTime()
Gets the reservation duration time.
|
double |
getExecStartTime()
Gets the Cloudlet's execution start time.
|
int |
getMachineId()
Gets machine ID.
|
int[] |
getMachineIdList()
Gets a list of Machine IDs.
|
int |
getNumberOfPes()
Gets the number of PEs required to execute this Cloudlet.
|
int |
getPeId()
Gets Pe ID.
|
int[] |
getPeIdList()
Gets a list of Pe IDs.
|
long |
getRemainingCloudletLength()
Gets the remaining cloudlet length.
|
int |
getReservationID()
Gets the reservation ID that owns this Cloudlet.
|
long |
getStartTime()
Gets the Cloudlet or reservation start time.
|
java.lang.String |
getUid()
Get unique string identificator of the VM.
|
int |
getUserId()
Gets the user or owner of this Cloudlet.
|
boolean |
hasReserved()
Checks whether this Cloudlet is submitted by reserving or not.
|
boolean |
setCloudletStatus(int status)
Sets the Cloudlet status.
|
void |
setExecParam(double wallClockTime,
double actualCPUTime)
Sets this Cloudlet's execution parameters.
|
void |
setFinishTime(double time)
Sets the finish time for this Cloudlet.
|
void |
setMachineAndPeId(int machineId,
int peId)
Sets the machine and Pe (Processing Element) ID.
|
void |
updateCloudletFinishedSoFar(long miLength)
A method that updates the length of cloudlet that has been completed.
|
public ResCloudlet(Cloudlet cloudlet)
gridsim.CloudSim#clock().cloudlet - a cloudlet objectgridsim.CloudSim#clock()public ResCloudlet(Cloudlet cloudlet, long startTime, int duration, int reservID)
gridsim.CloudSim#clock().cloudlet - a cloudlet objectstartTime - a reservation start time. Can also be interpreted as starting time to
execute this Cloudlet.duration - a reservation duration time. Can also be interpreted as how long to execute
this Cloudlet.reservID - a reservation ID that owns this Cloudletgridsim.CloudSim#clock()public long getStartTime()
public int getDurationTime()
public int getNumberOfPes()
public int getReservationID()
public boolean hasReserved()
public int getCloudletId()
public int getUserId()
public long getCloudletLength()
public long getCloudletTotalLength()
public int getCloudletClassType()
public boolean setCloudletStatus(int status)
status - the Cloudlet statuspublic double getExecStartTime()
public void setExecParam(double wallClockTime,
double actualCPUTime)
wallClockTime - the time of this Cloudlet resides in a CloudResource (from arrival time
until departure time).actualCPUTime - the total execution time of this Cloudlet in a CloudResource.public void setMachineAndPeId(int machineId,
int peId)
machineId - machine IDpeId - Pe IDpublic int getMachineId()
public int getPeId()
public int[] getPeIdList()
getMachineIdList().public int[] getMachineIdList()
getPeIdList().public long getRemainingCloudletLength()
public void finalizeCloudlet()
public void updateCloudletFinishedSoFar(long miLength)
miLength - cloudlet length in Instructions (I)public double getCloudletArrivalTime()
public void setFinishTime(double time)
time - finish timepublic double getClouddletFinishTime()
public Cloudlet getCloudlet()
public int getCloudletStatus()
public java.lang.String getUid()