Package org.cloudsimplus.builders
Class VmBuilder
java.lang.Object
org.cloudsimplus.builders.VmBuilder
- All Implemented Interfaces:
Builder
public class VmBuilder extends Object implements Builder
- Since:
- CloudSim Plus 1.0
- Author:
- Manoel Campos da Silva Filho
- See Also:
VmSimple.setDefaultRamCapacity(long)
,VmSimple.setDefaultBwCapacity(long)
,VmSimple.setDefaultStorageCapacity(long)
-
Constructor Summary
Constructors Constructor Description VmBuilder(DatacenterBrokerSimple broker)
-
Method Summary
Modifier and Type Method Description VmBuilder
createAndSubmit()
Creates and submits one VM to its broker.VmBuilder
createAndSubmit(int amount)
Creates and submits a list of VM to its broker.double
getMips()
long
getPes()
Vm
getVmById(int id)
List<Vm>
getVms()
VmBuilder
setCloudletSchedulerSupplier(Supplier<CloudletScheduler> cloudletSchedulerSupplier)
VmBuilder
setMips(double defaultMIPS)
VmBuilder
setOnHostAllocationListener(EventListener<VmHostEventInfo> listener)
VmBuilder
setOnHostDeallocationListener(EventListener<VmHostEventInfo> listener)
VmBuilder
setOnUpdateVmProcessingListener(EventListener<VmHostEventInfo> listener)
VmBuilder
setOnVmCreationFailureListener(EventListener<VmDatacenterEventInfo> listener)
VmBuilder
setPes(long defaultPEs)
VmBuilder
setVmCreationFunction(BiFunction<Double,Long,Vm> vmCreationFunction)
Sets aBiFunction
used to create VMs.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.cloudsimplus.builders.Builder
validateAmount
-
Constructor Details
-
VmBuilder
-
-
Method Details
-
createAndSubmit
Creates and submits one VM to its broker.- Returns:
-
createAndSubmit
Creates and submits a list of VM to its broker.- Returns:
-
getVms
-
setMips
-
setPes
-
getVmById
-
getMips
public double getMips() -
getPes
public long getPes() -
setVmCreationFunction
Sets aBiFunction
used to create VMs. It must receive the MIPS capacity of eachPe
and the number of PEs for the VM it will create.- Parameters:
vmCreationFunction
-
-
setCloudletSchedulerSupplier
public VmBuilder setCloudletSchedulerSupplier(Supplier<CloudletScheduler> cloudletSchedulerSupplier) -
setOnHostAllocationListener
-
setOnHostDeallocationListener
-
setOnVmCreationFailureListener
-
setOnUpdateVmProcessingListener
-