HostBuilder

public class HostBuilder implements Builder

A Builder class to create Host objects using the default configurations defined in Host class.

Author:Manoel Campos da Silva Filho

See also: HostSimple.setDefaultRamCapacity(long), HostSimple.setDefaultBwCapacity(long), HostSimple.setDefaultStorageCapacity(long)

Constructors

HostBuilder

public HostBuilder()

Methods

create

public HostBuilder create()

Creates a single Host and stores it internally.

See also: .getHosts()

create

public HostBuilder create(int amount)

Creates a list of Hosts and stores it internally.

See also: .getHosts()

getHosts

public List<Host> getHosts()

Gets the list of all created Hosts.

See also: .create(), .create(int)

getMips

public double getMips()

getPes

public int getPes()

setHostCreationFunction

public void setHostCreationFunction(Function<List<Pe>, Host> hostCreationFunction)

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

Parameters:
  • hostCreationFunction

setMips

public HostBuilder setMips(double defaultMIPS)

setOnUpdateVmsProcessingListener

public HostBuilder setOnUpdateVmsProcessingListener(EventListener<HostUpdatesVmsProcessingEventInfo> listener)

setPes

public HostBuilder setPes(int defaultPEs)

setVmSchedulerSupplier

public HostBuilder setVmSchedulerSupplier(Supplier<VmScheduler> vmSchedulerSupplier)