DatacenterBuilder

public class DatacenterBuilder implements Builder

A Builder class to createDatacenter DatacenterSimple objects.

Author:Manoel Campos da Silva Filho

Constructors

DatacenterBuilder

public DatacenterBuilder(SimulationScenarioBuilder scenario)

Methods

addStorageToList

public DatacenterBuilder addStorageToList(FileStorage storage)

create

public DatacenterBuilder create(List<Host> hosts)

get

public Datacenter get(int index)

getCostPerBwMegabit

public double getCostPerBwMegabit()

getCostPerCpuSecond

public double getCostPerCpuSecond()

getCostPerMem

public double getCostPerMem()

getCostPerStorage

public double getCostPerStorage()

getDatacenters

public List<Datacenter> getDatacenters()

getFirstHostFromFirstDatacenter

public Host getFirstHostFromFirstDatacenter()

getHostOfDatacenter

public Host getHostOfDatacenter(int hostIndex, int datacenterIndex)

getSchedulingInterval

public double getSchedulingInterval()

getTimezone

public double getTimezone()

setCostPerBwMegabit

public DatacenterBuilder setCostPerBwMegabit(double defaultCostPerBwByte)

setCostPerCpuSecond

public DatacenterBuilder setCostPerCpuSecond(double defaultCostPerCpuSecond)

setCostPerMem

public DatacenterBuilder setCostPerMem(double defaultCostPerMem)

setCostPerStorage

public DatacenterBuilder setCostPerStorage(double defaultCostPerStorage)

setDatacenterCreationFunction

public void setDatacenterCreationFunction(Function<List<Host>, Datacenter> datacenterCreationFunction)

Sets a Function used to create Datacenters. It must receive a list of Host for the Datacenter it will create.

Parameters:
  • datacenterCreationFunction

setSchedulingInterval

public DatacenterBuilder setSchedulingInterval(double schedulingInterval)

setStorageList

public DatacenterBuilder setStorageList(List<FileStorage> storageList)

setTimezone

public DatacenterBuilder setTimezone(double defaultTimezone)