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

org.cloudbus.cloudsim.provisioners.ResourceProvisionerNull 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.provisioners;

import org.cloudbus.cloudsim.resources.Resource;
import org.cloudbus.cloudsim.resources.ResourceManageable;
import org.cloudbus.cloudsim.vms.Vm;

import java.util.function.Function;

/**
 * A class that implements the Null Object Design Pattern for
 * {@link ResourceProvisioner} class.
 *
 * @author Manoel Campos da Silva Filho
 * @see ResourceProvisioner#NULL
 */
class ResourceProvisionerNull implements ResourceProvisioner {
    @Override public boolean allocateResourceForVm(Vm vm, long newTotalVmResourceCapacity) {
        return false;
    }
    @Override public long getAllocatedResourceForVm(Vm vm) {
        return 0;
    }
    @Override public long getTotalAllocatedResource() {
        return 0;
    }
    @Override public long deallocateResourceForVm(Vm vm) {
        return 0;
    }
    @Override public boolean isSuitableForVm(Vm vm, long newVmTotalAllocatedResource) {
        return false;
    }
    @Override public boolean isSuitableForVm(Vm vm, Resource resource) { return false; }
    @Override public ResourceManageable getPmResource() {
        return ResourceManageable.NULL;
    }
    @Override public void setResources(ResourceManageable pmResource, Function vmResourceFunction) {/**/}
    @Override public long getCapacity() { return 0; }
    @Override public long getAvailableResource() { return 0; }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy