UtilizationModel¶
-
public interface
UtilizationModel
¶ The UtilizationModel interface needs to be implemented in order to provide a fine-grained control over resource usage by a Cloudlet. It also implements the Null Object Design Pattern in order to start avoiding
NullPointerException
when using theUtilizationModel.NULL
object instead of attributingnull
toUtilizationModel
variables.Author: Anton Beloglazov, Manoel Campos da Silva Filho
Fields¶
NULL¶
-
UtilizationModel
NULL
¶ An attribute that implements the Null Object Design Pattern for
UtilizationModel
objects using a Lambda Expression.
Methods¶
getSimulation¶
-
Simulation
getSimulation
()¶ Gets the simulation that this UtilizationModel belongs to.
getUtilization¶
-
double
getUtilization
(double time)¶ Gets the expected utilization of resource at a given simulation time. Such a value can be a percentage in scale from [0 to 1] or an absolute value, depending on the
getUnit()
.It is an expected usage value because the actual resource usage depends on the available resource.
Parameters: - time – the time to get the resource usage.
Returns: the resource utilization at the given time
See also:
.getUnit()
getUtilization¶
-
double
getUtilization
()¶ Gets the expected utilization of resource at the current simulation time. Such a value can be a percentage in scale from [0 to 1] or an absolute value, depending on the
getUnit()
.It is an expected usage value because the actual resource usage depends on the available resource.
Returns: the current resource utilization See also:
.getUnit()
setSimulation¶
-
UtilizationModel
setSimulation
(Simulation simulation)¶ Sets the simulation that this UtilizationModel belongs to.
Parameters: - simulation – the Simulation instance to set