All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.cloudbus.cloudsim.power.models.PowerModelDatacenter Maven / Gradle / Ivy

Go to download

CloudSim Plus: A modern, highly extensible and easier-to-use Java 8 Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services

There is a newer version: 8.0.0
Show newest version
package org.cloudbus.cloudsim.power.models;

import org.cloudbus.cloudsim.datacenters.Datacenter;

import java.util.Objects;

/**
 * Abstract implementation of a data center power model.
 * @since CloudSim Plus 6.0.0
 */
public abstract class PowerModelDatacenter implements PowerModel {
    /**
     * An attribute that implements the Null Object Design Pattern for {@link PowerModelDatacenter}
     * objects.
     */
    public static final PowerModelDatacenterNull NULL = new PowerModelDatacenterNull();

    private Datacenter datacenter;

    /**
     * Gets the Datacenter this PowerModel is collecting power consumption measurements from.
     * @return
     */
    public Datacenter getDatacenter() {
        return datacenter;
    }

    /**
     * Sets the Datacenter this PowerModel will collect power consumption measurements from.
     * @param datacenter the Datacenter to set
     */
    public final void setDatacenter(final Datacenter datacenter) {
        this.datacenter = Objects.requireNonNull(datacenter);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy