Class CloudletTaskSchedulerSimple

java.lang.Object
org.cloudsimplus.schedulers.cloudlet.network.CloudletTaskSchedulerSimple
All Implemented Interfaces:
CloudletTaskScheduler

public class CloudletTaskSchedulerSimple extends Object implements 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
  • Constructor Details

    • CloudletTaskSchedulerSimple

      public CloudletTaskSchedulerSimple()
      Creates a CloudletTaskSchedulerSimple.
  • Method Details

    • processCloudletTasks

      public void processCloudletTasks(Cloudlet cloudlet, long partialFinishedMI)
      Description copied from interface: CloudletTaskScheduler
      Process Cloudlet's tasks, such as tasks to send packets from or received by a Cloudlet inside a VM.
      Specified by:
      processCloudletTasks in interface CloudletTaskScheduler
      Parameters:
      cloudlet - the Cloudlet to process packets
      partialFinishedMI - the partial executed length of this Cloudlet (in MI)
    • isTimeToUpdateCloudletProcessing

      public boolean isTimeToUpdateCloudletProcessing(@NonNull @NonNull Cloudlet cloudlet)
      Description copied from interface: CloudletTaskScheduler
      Checks 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:
      isTimeToUpdateCloudletProcessing in interface CloudletTaskScheduler
      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: CloudletTaskScheduler
      Clears the list of VmPacket's to send from the Vm of this scheduler to other VMs.
      Specified by:
      clearVmPacketsToSend in interface CloudletTaskScheduler
    • getVmPacketsToSend

      public List<VmPacket> getVmPacketsToSend()
      Specified by:
      getVmPacketsToSend in interface CloudletTaskScheduler
      Returns:
      read-only list of VmPacket's to send from the Vm of this scheduler to other VMs.
    • addPacketToListOfPacketsSentFromVm

      public boolean addPacketToListOfPacketsSentFromVm(VmPacket pkt)
      Description copied from interface: CloudletTaskScheduler
      Adds 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:
      addPacketToListOfPacketsSentFromVm in interface CloudletTaskScheduler
      Parameters:
      pkt - packet to be added to the list
      Returns:
      true if the packet was added, false otherwise