Class DatacenterBrokerSimple

    • Constructor Detail

      • DatacenterBrokerSimple

        public DatacenterBrokerSimple​(CloudSim simulation)
        Creates a new DatacenterBroker.
        Parameters:
        simulation - name to be associated with this entity
      • DatacenterBrokerSimple

        public DatacenterBrokerSimple​(CloudSim simulation,
                                      String name)
        Creates a DatacenterBroker giving a specific name.
        Parameters:
        simulation - the CloudSim instance that represents the simulation the Entity is related to
        name - the DatacenterBroker name
    • Method Detail

      • selectDatacenterForWaitingVms

        protected Datacenter selectDatacenterForWaitingVms()
        Defines the policy to select a Datacenter to Host a VM. It always selects the first Datacenter from the Datacenter list.
        Returns:
        the Datacenter selected to request the creating of waiting VMs or Datacenter.NULL if no suitable Datacenter was found
      • selectFallbackDatacenterForWaitingVms

        protected Datacenter selectFallbackDatacenterForWaitingVms()
        Defines the policy to select a fallback Datacenter to Host a VM when a previous selected Datacenter failed to create the requested VMs.

        It gets the first Datacenter that has not been tried yet.

        Returns:
        the Datacenter selected to try creating the remaining VMs or Datacenter.NULL if no suitable Datacenter was found
      • defaultVmMapper

        public Vm defaultVmMapper​(Cloudlet cloudlet)
        Description copied from interface: DatacenterBroker
        Defines the default policy used to select a Vm to host a Cloudlet that is waiting to be created.
        It applies a Round-Robin policy to cyclically select the next Vm from the list of waiting VMs.
        Parameters:
        cloudlet - the cloudlet that needs a VM to be placed into
        Returns:
        the selected Vm for the cloudlet or Vm.NULL if no suitable VM was found