org.cloudsimplus.provisioners.ResourceProvisionerNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsimplus Show documentation
Show all versions of cloudsimplus Show documentation
CloudSim Plus: A modern, highly extensible and easier-to-use Java 17+ Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services
package org.cloudsimplus.provisioners;
import org.cloudsimplus.resources.Resource;
import org.cloudsimplus.resources.ResourceManageable;
import org.cloudsimplus.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 - 2025 Weber Informatics LLC | Privacy Policy