Class DatacenterCharacteristicsSimple
java.lang.Object
org.cloudbus.cloudsim.datacenters.DatacenterCharacteristicsSimple
- All Implemented Interfaces:
Identifiable
,DatacenterCharacteristics
public class DatacenterCharacteristicsSimple extends Object implements DatacenterCharacteristics
Represents static properties of a Datacenter such as architecture, Operating
System (OS), management policy (time- or space-shared), cost and time zone at
which the resource is located along resource configuration. Each
Datacenter
has to have its own instance of this class, since it
stores the Datacenter host list.- Since:
- CloudSim Toolkit 1.0
- Author:
- Manzur Murshed, Rajkumar Buyya, Rodrigo N. Calheiros, Anton Beloglazov
-
Field Summary
Fields inherited from interface org.cloudbus.cloudsim.datacenters.DatacenterCharacteristics
DEFAULT_ARCH, DEFAULT_OS, DEFAULT_VMM, NULL
-
Constructor Summary
Constructors Constructor Description DatacenterCharacteristicsSimple(Datacenter datacenter)
-
Method Summary
Modifier and Type Method Description String
getArchitecture()
Gets the architecture of the Datacenter.double
getCostPerBw()
Get the monetary cost to use each each Megabit of bandwidth in the Datacenter.double
getCostPerMem()
Get the monetary cost to use each Megabyte of RAM in the Datacenter.double
getCostPerSecond()
Gets the monetary cost per second of CPU for using the Hosts in the Datacenter.double
getCostPerStorage()
Get the monetary cost to use each Megabyte of storage in the Datacenter.Datacenter
getDatacenter()
Gets theDatacenter
that owns these characteristicslong
getId()
Gets the Datacenter id, setup when Datacenter is created.double
getMips()
Gets the total MIPS rating, which is the sum of MIPS rating of all Hosts in the Datacenter.long
getNumberOfFailedHosts()
Gets the current number of failed PMs.int
getNumberOfPes()
Gets the total number of PEs for all PMs.String
getOs()
Gets the Operating System (OS) used by the Hosts in the Datacenter.String
getVmm()
Gets the Virtual Machine Monitor (VMM), also called hypervisor, used in the Datacenter.boolean
isWorking()
Checks whether all PMs of the Datacenter are working properly or not.DatacenterCharacteristics
setArchitecture(String architecture)
Sets the architecture.DatacenterCharacteristics
setCostPerBw(double costPerBw)
Sets the monetary cost to use each Megabit of bandwidth.DatacenterCharacteristics
setCostPerMem(double costPerMem)
Sets the monetary cost to use each Megabyte of RAM in the Datacenter.DatacenterCharacteristics
setCostPerSecond(double costPerSecond)
Sets the monetary cost per second of CPU.DatacenterCharacteristics
setCostPerStorage(double costPerStorage)
Sets the monetary cost to use each Megabyte of storage.DatacenterCharacteristics
setOs(String os)
Sets the Operating System (OS).DatacenterCharacteristics
setVmm(String vmm)
Sets the vmm.
-
Constructor Details
-
DatacenterCharacteristicsSimple
Creates a DatacenterCharacteristics with default values forarchitecture
,OS
andVMM
. The costs forBW
,getCostPerMem()
() RAM} andgetCostPerStorage()
() Storage} are set to zero.
-
-
Method Details
-
getMips
public double getMips()Description copied from interface:DatacenterCharacteristics
Gets the total MIPS rating, which is the sum of MIPS rating of all Hosts in the Datacenter.- Specified by:
getMips
in interfaceDatacenterCharacteristics
- Returns:
- the sum of MIPS ratings
-
getNumberOfPes
public int getNumberOfPes()Description copied from interface:DatacenterCharacteristics
Gets the total number of PEs for all PMs.- Specified by:
getNumberOfPes
in interfaceDatacenterCharacteristics
- Returns:
- number of PEs
-
getNumberOfFailedHosts
public long getNumberOfFailedHosts()Description copied from interface:DatacenterCharacteristics
Gets the current number of failed PMs.- Specified by:
getNumberOfFailedHosts
in interfaceDatacenterCharacteristics
- Returns:
- current number of failed PMs the Datacenter has.
-
isWorking
public boolean isWorking()Description copied from interface:DatacenterCharacteristics
Checks whether all PMs of the Datacenter are working properly or not.- Specified by:
isWorking
in interfaceDatacenterCharacteristics
- Returns:
- if all PMs are working, otherwise
-
getCostPerMem
public double getCostPerMem()Description copied from interface:DatacenterCharacteristics
Get the monetary cost to use each Megabyte of RAM in the Datacenter.- Specified by:
getCostPerMem
in interfaceDatacenterCharacteristics
- Returns:
- the cost ($) to use RAM
-
setCostPerMem
Description copied from interface:DatacenterCharacteristics
Sets the monetary cost to use each Megabyte of RAM in the Datacenter.- Specified by:
setCostPerMem
in interfaceDatacenterCharacteristics
- Parameters:
costPerMem
- cost ($) to use RAM
-
getCostPerStorage
public double getCostPerStorage()Description copied from interface:DatacenterCharacteristics
Get the monetary cost to use each Megabyte of storage in the Datacenter.- Specified by:
getCostPerStorage
in interfaceDatacenterCharacteristics
- Returns:
- the cost ($) to use storage
-
setCostPerStorage
Description copied from interface:DatacenterCharacteristics
Sets the monetary cost to use each Megabyte of storage.- Specified by:
setCostPerStorage
in interfaceDatacenterCharacteristics
- Parameters:
costPerStorage
- cost ($) to use storage
-
getCostPerBw
public double getCostPerBw()Description copied from interface:DatacenterCharacteristics
Get the monetary cost to use each each Megabit of bandwidth in the Datacenter.- Specified by:
getCostPerBw
in interfaceDatacenterCharacteristics
- Returns:
- the cost ($) to use bw
-
setCostPerBw
Description copied from interface:DatacenterCharacteristics
Sets the monetary cost to use each Megabit of bandwidth.- Specified by:
setCostPerBw
in interfaceDatacenterCharacteristics
- Parameters:
costPerBw
- the cost ($) to set
-
getVmm
Description copied from interface:DatacenterCharacteristics
Gets the Virtual Machine Monitor (VMM), also called hypervisor, used in the Datacenter.- Specified by:
getVmm
in interfaceDatacenterCharacteristics
- Returns:
- the VMM name
-
getId
public long getId()Gets the Datacenter id, setup when Datacenter is created.- Specified by:
getId
in interfaceDatacenterCharacteristics
- Specified by:
getId
in interfaceIdentifiable
- Returns:
-
getArchitecture
Description copied from interface:DatacenterCharacteristics
Gets the architecture of the Datacenter.- Specified by:
getArchitecture
in interfaceDatacenterCharacteristics
- Returns:
- the architecture
-
setArchitecture
Description copied from interface:DatacenterCharacteristics
Sets the architecture.- Specified by:
setArchitecture
in interfaceDatacenterCharacteristics
- Parameters:
architecture
- the new architecture
-
getOs
Description copied from interface:DatacenterCharacteristics
Gets the Operating System (OS) used by the Hosts in the Datacenter.- Specified by:
getOs
in interfaceDatacenterCharacteristics
- Returns:
- the Operating System (OS)
-
setOs
Description copied from interface:DatacenterCharacteristics
Sets the Operating System (OS).- Specified by:
setOs
in interfaceDatacenterCharacteristics
- Parameters:
os
- the new Operating System (OS)
-
getCostPerSecond
public double getCostPerSecond()Description copied from interface:DatacenterCharacteristics
Gets the monetary cost per second of CPU for using the Hosts in the Datacenter.- Specified by:
getCostPerSecond
in interfaceDatacenterCharacteristics
- Returns:
- the cost ($) per second
-
setCostPerSecond
Description copied from interface:DatacenterCharacteristics
Sets the monetary cost per second of CPU.- Specified by:
setCostPerSecond
in interfaceDatacenterCharacteristics
- Parameters:
costPerSecond
- the new cost ($) per second
-
setVmm
Description copied from interface:DatacenterCharacteristics
Sets the vmm.- Specified by:
setVmm
in interfaceDatacenterCharacteristics
- Parameters:
vmm
- the new vmm
-
getDatacenter
Description copied from interface:DatacenterCharacteristics
Gets theDatacenter
that owns these characteristics- Specified by:
getDatacenter
in interfaceDatacenterCharacteristics
- Returns:
- the Datacenter
-