DatacenterBrokerSimple

public class DatacenterBrokerSimple extends DatacenterBrokerAbstract

A simple implementation of DatacenterBroker that try to host customer’s VMs at the first Datacenter found. If there isn’t capacity in that one, it will try the other ones.

The selection of VMs for each cloudlet is based on a Round-Robin policy, cyclically selecting the next VM from the broker VM list for each requesting cloudlet.

Author:Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho

Constructors

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

Methods

defaultVmMapper

public Vm defaultVmMapper(Cloudlet cloudlet)

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