Class CloudletTaskSchedulerSimple
java.lang.Object
org.cloudsimplus.schedulers.cloudlet.network.CloudletTaskSchedulerSimple
- All Implemented Interfaces:
CloudletTaskScheduler
A scheduling policy performed by a
Vm to process CloudletTasks
belonging to a NetworkCloudlet.
It also schedules the network communication between Cloudlets, managing the time a Cloudlet stays blocked waiting the response of a network packet sent to another cloudlet.
- Since:
- CloudSim Plus 1.0
- Author:
- Saurabh Kumar Garg, Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from interface org.cloudsimplus.schedulers.cloudlet.network.CloudletTaskScheduler
NULL -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanAdds a packet to the list of packets sent by a given VM, targeting the VM of this scheduler.voidClears the list ofVmPacket's to send from the Vm of this scheduler to other VMs.booleanisTimeToUpdateCloudletProcessing(@NonNull Cloudlet cloudlet) Checks if it's time to update the execution of a given Cloudlet.voidprocessCloudletTasks(Cloudlet cloudlet, long partialFinishedMI) Process Cloudlet's tasks, such as tasks to send packets from or received by a Cloudlet inside a VM.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.cloudsimplus.schedulers.cloudlet.network.CloudletTaskScheduler
getVm, setVm
-
Constructor Details
-
CloudletTaskSchedulerSimple
public CloudletTaskSchedulerSimple()Creates a CloudletTaskSchedulerSimple.
-
-
Method Details
-
processCloudletTasks
Description copied from interface:CloudletTaskSchedulerProcess Cloudlet's tasks, such as tasks to send packets from or received by a Cloudlet inside a VM.- Specified by:
processCloudletTasksin interfaceCloudletTaskScheduler- Parameters:
cloudlet- the Cloudlet to process packetspartialFinishedMI- the partial executed length of this Cloudlet (in MI)
-
isTimeToUpdateCloudletProcessing
Description copied from interface:CloudletTaskSchedulerChecks if it's time to update the execution of a given Cloudlet. If the Cloudlet is waiting for packets to be sent or received, then it isn't time to update its processing.- Specified by:
isTimeToUpdateCloudletProcessingin interfaceCloudletTaskScheduler- Parameters:
cloudlet- the Cloudlet to check if it is time to update its execution- Returns:
- true if it's time to update Cloudlet execution, false otherwise.
-
clearVmPacketsToSend
public void clearVmPacketsToSend()Description copied from interface:CloudletTaskSchedulerClears the list ofVmPacket's to send from the Vm of this scheduler to other VMs.- Specified by:
clearVmPacketsToSendin interfaceCloudletTaskScheduler
-
getVmPacketsToSend
- Specified by:
getVmPacketsToSendin interfaceCloudletTaskScheduler- Returns:
- read-only list of
VmPacket's to send from the Vm of this scheduler to other VMs.
-
addPacketToListOfPacketsSentFromVm
Description copied from interface:CloudletTaskSchedulerAdds a packet to the list of packets sent by a given VM, targeting the VM of this scheduler. The source VM is got from the packet.- Specified by:
addPacketToListOfPacketsSentFromVmin interfaceCloudletTaskScheduler- Parameters:
pkt- packet to be added to the list- Returns:
- true if the packet was added, false otherwise
-