public interface Datacenter extends SimEntity
NullPointerException
when using the
NULL
object instead of attributing null
to
Datacenter
variables.SimEntity.State
Modifier and Type | Field and Description |
---|---|
static double |
DEF_BANDWIDTH_PERCENT_FOR_MIGRATION
The default percentage of bandwidth allocated for VM migration, is
a value is not set.
|
static Datacenter |
NULL
A property that implements the Null Object Design Pattern for
Datacenter objects. |
Modifier and Type | Method and Description |
---|---|
int |
addFile(File file)
Adds a file into the resource's storage before the experiment starts.
|
<T extends Host> |
addHost(T host)
Physically expands the Datacenter by adding a new Host (physical machine) to it.
|
<T extends Host> |
addHostList(List<T> hostList)
Physically expands the Datacenter by adding a List of new Hosts (physical machines) to it.
|
double |
getBandwidthPercentForMigration()
Gets the percentage of the bandwidth allocated to a Host to
migrate VMs.
|
DatacenterCharacteristics |
getCharacteristics()
Gets the Datacenter characteristics.
|
Host |
getHost(int index) |
<T extends Host> |
getHostList()
Gets an unmodifiable host list.
|
double |
getPower()
Gets an estimation of Datacenter power consumption (in Watts/Second).
|
double |
getPowerInKWattsHour()
Gets an estimation the Datacenter power consumption (in Kilo Watts/Hour).
|
double |
getSchedulingInterval()
Gets the scheduling interval to process each event received by the
Datacenter (in seconds).
|
List<FileStorage> |
getStorageList()
Gets a read-only list of storage devices of the Datacenter.
|
VmAllocationPolicy |
getVmAllocationPolicy()
Gets the policy to be used by the Datacenter to allocate VMs into hosts.
|
<T extends Vm> |
getVmList()
Gets a read-only list all VMs from all Hosts of this Datacenter.
|
void |
setBandwidthPercentForMigration(double bandwidthPercentForMigration)
Sets the percentage of the bandwidth allocated to a Host to
migrate VMs.
|
Datacenter |
setSchedulingInterval(double schedulingInterval)
Sets the scheduling delay to process each event received by the
Datacenter (in seconds).
|
Datacenter |
setStorageList(List<FileStorage> storageList)
Sets the list of storage devices of the Datacenter.
|
getSimulation, isStarted, println, println, processEvent, run, schedule, setLog, setName, setSimulation, setState, shutdownEntity, start
getId
compareTo
static final Datacenter NULL
Datacenter
objects.static final double DEF_BANDWIDTH_PERCENT_FOR_MIGRATION
int addFile(File file)
file
- a DataCloud file<T extends Host> List<T> getHostList()
T
- The generic typeHost getHost(int index)
<T extends Host> Datacenter addHostList(List<T> hostList)
VmAllocationPolicy
.
If an ID is not assigned to a Host, the method assigns one.
hostList
- the List of new hosts to be addedgetVmAllocationPolicy()
<T extends Host> Datacenter addHost(T host)
VmAllocationPolicy
.
If an ID is not assigned to the given Host, the method assigns one.
host
- the new host to be addedgetVmAllocationPolicy()
VmAllocationPolicy getVmAllocationPolicy()
VmAllocationPolicy
<T extends Vm> List<T> getVmList()
T
- the class of VMs inside the listdouble getSchedulingInterval()
Cloudlet.getFinishedLengthSoFar(Datacenter)
, it
will not return an updated value. By this way, one should set the
scheduling interval to 5 to get an updated result. As longer is the
interval, faster will be the simulation execution.Datacenter setSchedulingInterval(double schedulingInterval)
schedulingInterval
- the new scheduling interval (in seconds)getSchedulingInterval()
DatacenterCharacteristics getCharacteristics()
List<FileStorage> getStorageList()
Datacenter setStorageList(List<FileStorage> storageList)
storageList
- the new storage listdouble getBandwidthPercentForMigration()
DEF_BANDWIDTH_PERCENT_FOR_MIGRATION
void setBandwidthPercentForMigration(double bandwidthPercentForMigration)
bandwidthPercentForMigration
- the bandwidth migration percentage to setdouble getPower()
To get actual power consumption, it's required to enable
Host's StateHistory
by calling Host.enableStateHistory()
and use each Host PowerModel
to compute power usage
based on the CPU utilization got form the StateHistory.
double getPowerInKWattsHour()
getPower()
Copyright © 2015–2018 Systems, Security and Image Communication Lab - Instituto de Telecomunicações (IT) - Universidade da Beira Interior (UBI) - Instituto Federal de Educação Ciência e Tecnologia do Tocantins (IFTO). All rights reserved.