VmBuilder

public class VmBuilder

A Builder class to create Vm objects.

Author:Manoel Campos da Silva Filho

Constructors

VmBuilder

public VmBuilder(DatacenterBrokerSimple broker)

Methods

createAndSubmitOneVm

public VmBuilder createAndSubmitOneVm()

createAndSubmitVms

public VmBuilder createAndSubmitVms(int amount)

getBandwidth

public long getBandwidth()

getMips

public double getMips()

getOnUpdateVmProcessingListener

public EventListener<VmHostEventInfo> getOnUpdateVmProcessingListener()

getPes

public int getPes()

getRam

public long getRam()

getSize

public long getSize()

getVmById

public Vm getVmById(int id)

getVms

public List<Vm> getVms()

setBandwidth

public VmBuilder setBandwidth(long defaultBW)

setCloudletSchedulerSupplier

public VmBuilder setCloudletSchedulerSupplier(Supplier<CloudletScheduler> cloudletSchedulerSupplier)

Sets a Supplier that is accountable to create CloudletScheduler for requested VMs.

Parameters:
  • cloudletSchedulerSupplier – the CloudletScheduler Supplier to set

setMips

public VmBuilder setMips(double defaultMIPS)

setOnHostAllocationListener

public VmBuilder setOnHostAllocationListener(EventListener<VmHostEventInfo> onHostAllocationListener)

setOnHostDeallocationListener

public VmBuilder setOnHostDeallocationListener(EventListener<VmHostEventInfo> onHostDeallocationListener)

setOnUpdateVmProcessingListener

public VmBuilder setOnUpdateVmProcessingListener(EventListener<VmHostEventInfo> onUpdateVmProcessing)

setOnVmCreationFilatureListenerForAllVms

public VmBuilder setOnVmCreationFilatureListenerForAllVms(EventListener<VmDatacenterEventInfo> onVmCreationFailureListener)

setPes

public VmBuilder setPes(int defaultPEs)

setRam

public VmBuilder setRam(int defaultRAM)

setSize

public VmBuilder setSize(long defaultSize)