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



public DatacenterBrokerSimple(CloudSim simulation)

Creates a new DatacenterBroker.

  • simulation – name to be associated with this entity


public DatacenterBrokerSimple(CloudSim simulation, String name)

Creates a DatacenterBroker giving a specific name.

  • simulation – the CloudSim instance that represents the simulation the Entity is related to
  • name – the DatacenterBroker name



public Vm defaultVmMapper(Cloudlet cloudlet)


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


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