Class NetworkVm

All Implemented Interfaces:
Comparable<Vm>, AbstractMachine<Resource>, ChangeableId, CustomerEntity, Delayable, Identifiable, ResourceStatsComputer<VmResourceStats>, UniquelyIdentifiable, TimeZoned, Resourceful, Vm

public class NetworkVm extends VmSimple
A Vm supporting simulation of network communication. It executes actions related to management of packets (sent and received).

Please refer to following publication for more details:

Since:
CloudSim Toolkit 3.0
Author:
Saurabh Kumar Garg
  • Field Details

  • Constructor Details

    • NetworkVm

      public NetworkVm(int id, long mipsCapacity, int numberOfPes)
      Creates a NetworkVm with 1024 MEGA of RAM, 1000 Megabits/s of Bandwidth and 1024 MEGA of Storage Size. To change these values, use the respective setters. While the Vm is not created inside a Host, such values can be changed freely.
      Parameters:
      id - unique ID of the VM
      mipsCapacity - the mips capacity of each Vm Pe
      numberOfPes - amount of Pe (CPU cores)
    • NetworkVm

      public NetworkVm(long mipsCapacity, int numberOfPes)
      Creates a NetworkVm with 1024 MEGA of RAM, 1000 Megabits/s of Bandwidth and 1024 MEGA of Storage Size. To change these values, use the respective setters. While the Vm is not created inside a Host, such values can be changed freely.

      It is not defined an id for the Vm. The id is defined when the Vm is submitted to a DatacenterBroker.

      Parameters:
      mipsCapacity - the mips capacity of each Vm Pe
      numberOfPes - amount of Pe (CPU cores)
  • Method Details

    • isFree

      public boolean isFree()
      Indicates if the VM is free or not.
    • getCloudletList

      public List<NetworkCloudlet> getCloudletList()
      List of NetworkCloudlet of the VM.
    • setCloudletList

      public void setCloudletList(List<NetworkCloudlet> cloudletList)
    • getReceivedPacketList

      public List<VmPacket> getReceivedPacketList()
      List of packets received by the VM.
    • setReceivedPacketList

      public void setReceivedPacketList(List<VmPacket> receivedPacketList)
    • setFree

      public void setFree(boolean free)
    • getFinishTime

      public double getFinishTime()
      The time when the VM finishes processing its cloudlets.
    • setFinishTime

      public void setFinishTime(double finishTime)
    • getHost

      public NetworkHost getHost()
      Description copied from interface: Vm
      Gets the Host where the Vm is or will be placed. To know if the Vm was already created inside this Host, call the Vm.isCreated() method.
      Specified by:
      getHost in interface Vm
      Overrides:
      getHost in class VmSimple
      Returns:
      the Host
      See Also:
    • setHost

      public Vm setHost(Host host)
      Description copied from interface: Vm
      Sets the PM that hosts the VM.
      Specified by:
      setHost in interface Vm
      Overrides:
      setHost in class VmSimple
      Parameters:
      host - Host to run the VM
      Returns: