Class VmSimple
- All Implemented Interfaces:
Comparable<Vm>,ChangeableId,CustomerEntity,ExecDelayable,Identifiable,Lifetimed,Machine<Resource>,ResourceStatsComputer<VmResourceStats>,Startable,SubmissionDelayable,UniquelyIdentifiable,TimeZoned,Resourceful,Vm
Host that may be shared among other VMs. It processes
Cloudlets (applications). This processing happens according to a policy,
defined by the CloudletScheduler. Each VM has an owner/user represented
by a DatacenterBroker, which can submit cloudlets to the VM to execute them.- Since:
- CloudSim Toolkit 1.0
- Author:
- Rodrigo N. Calheiros, Anton Beloglazov, Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from class org.cloudsimplus.vms.VmAbstract
allocatedMips, description, expectedFreePesNumber, freePesNumber, onCreationFailureListeners, onHostAllocationListeners, onHostDeallocationListeners, onMigrationFinishListeners, onMigrationStartListeners, onUpdateProcessingListeners, processor, requestedMips, resources, stateHistoryFields inherited from interface org.cloudsimplus.core.Startable
NOT_ASSIGNEDFields inherited from interface org.cloudsimplus.datacenters.TimeZoned
MAX_TIME_ZONE_OFFSET, MIN_TIME_ZONE_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionVmSimple(double mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.VmSimple(double mipsCapacity, long pesNumber, CloudletScheduler cloudletScheduler) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.VmSimple(long id, double mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.VmSimple(long id, long mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.A copy constructor that creates a VM based on the configuration of another one. -
Method Summary
Modifier and TypeMethodDescriptionintCompare this Vm with another one based onVmAbstract.getTotalMipsCapacity().toString()Methods inherited from class org.cloudsimplus.vms.VmAbstract
addExpectedFreePesNumber, addOnCreationFailureListener, addOnHostAllocationListener, addOnHostDeallocationListener, addOnMigrationFinishListener, addOnMigrationStartListener, addOnUpdateProcessingListener, addStateHistoryEntry, enableUtilizationStats, getCpuPercentRequested, getCpuPercentRequested, getCpuPercentUtilization, getCpuPercentUtilization, getCurrentRequestedBw, getCurrentRequestedMips, getCurrentRequestedRam, getExpectedHostCpuUtilization, getFirstVm, getHostBwUtilization, getHostCpuUtilization, getHostRamUtilization, getList, getMips, getPesNumber, getRam, getResource, getResources, getStateHistory, getTotalCpuMipsRequested, getTotalCpuMipsUtilization, getTotalCpuMipsUtilization, getTotalMipsCapacity, getVmCount, hasStartedSomeCloudlet, isFinished, isSubmissionDelayed, isSuitableForCloudlet, isVmList, isWorking, mutableAttributesInit, notifyOnCreationFailureListeners, notifyOnHostAllocationListeners, notifyOnHostDeallocationListeners, notifyOnUpdateProcessingListeners, onFinish, onStart, removeExpectedFreePesNumber, removeOnCreationFailureListener, removeOnHostAllocationListener, removeOnHostDeallocationListener, removeOnMigrationFinishListener, removeOnMigrationStartListener, removeOnUpdateProcessingListener, setAllocatedMips, setBw, setBwVerticalScaling, setCloudletScheduler, setCloudletsToFailed, setCreated, setDefaultBwCapacity, setDefaultRamCapacity, setDefaultStorageCapacity, setDescription, setFailed, setFreePesNumber, setGroup, setHorizontalScaling, setHost, setInMigration, setMips, setPesNumber, setPeVerticalScaling, setRam, setRamVerticalScaling, setRequestedMips, setSize, setStartTime, setStorage, setSubmissionDelay, setTimeZone, setVmm, shutdown, updateMigrationFinishListeners, updateMigrationStartListeners, updateProcessing, updateProcessingMethods inherited from class org.cloudsimplus.core.CustomerEntityAbstract
getCreationWaitTime, getSimulation, getUid, setCreationTime, setCreationTime, setLifeTimeMethods inherited from class org.cloudsimplus.core.ExecDelayableAbstract
isShuttingDown, setShutDownDelay, setStartupDelayMethods inherited from class org.cloudsimplus.core.StartableAbstract
getTotalExecutionTime, setFinishTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudsimplus.core.ChangeableId
setIdMethods inherited from interface org.cloudsimplus.core.CustomerEntity
getBrokerArrivalTime, getCreationTime, getCreationWaitTime, getFinishTime, getLastTriedDatacenter, setBrokerArrivalTime, setLastTriedDatacenterMethods inherited from interface org.cloudsimplus.core.ExecDelayable
getRemainingStartupTime, getShutdownBeginTime, getShutDownDelay, getStartupCompletionTime, getStartupDelay, isShutDownDelayed, isShuttingDown, isStartupDelayed, setShutdownBeginTime, setShutDownDelayMethods inherited from interface org.cloudsimplus.core.Identifiable
getIdMethods inherited from interface org.cloudsimplus.core.Lifetimed
isLifeTimeReachedMethods inherited from interface org.cloudsimplus.core.Machine
getIdleInterval, getLastBusyTime, getSimulation, isIdleMethods inherited from interface org.cloudsimplus.core.ResourceStatsComputer
getCpuUtilizationStatsMethods inherited from interface org.cloudsimplus.core.Startable
getStartTime, hasStarted, setFinishTime, setLastBusyTimeMethods inherited from interface org.cloudsimplus.core.SubmissionDelayable
getSubmissionDelayMethods inherited from interface org.cloudsimplus.datacenters.TimeZoned
distance, validateTimeZoneMethods inherited from interface org.cloudsimplus.core.UniquelyIdentifiable
getUidMethods inherited from interface org.cloudsimplus.vms.Vm
getBootModel, getBroker, getBw, getBwVerticalScaling, getCloudletScheduler, getDescription, getExpectedFreePesNumber, getFreePesNumber, getGroup, getHorizontalScaling, getHost, getHostCpuUtilization, getLifeTime, getPeVerticalScaling, getProcessor, getRamVerticalScaling, getStorage, getTimeZone, getTotalExecutionTime, getVmm, isCreated, isFailed, isIdleEnough, isInMigration, isStartingUp, setBootModel, setBroker, setLifeTime, setStartupDelay
-
Constructor Details
-
VmSimple
A copy constructor that creates a VM based on the configuration of another one. The created VM will have the same MIPS capacity, number of PEs, BW, RAM and size of the given VM, but a defaultCloudletSchedulerand noDatacenterBroker.- Parameters:
sourceVm- the VM to be cloned- See Also:
-
VmSimple
public VmSimple(double mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size. To change these values, use the respective setters. While the Vm is being instantiated, such values can be changed freely.
It is not defined an
idfor the Vm. Theidis defined when the Vm is submitted to aDatacenterBroker.NOTE: The Vm will use a
CloudletSchedulerTimeSharedby default. If you need to change that, just callVmAbstract.setCloudletScheduler(CloudletScheduler). -
VmSimple
Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size. To change these values, use the respective setters. While the Vm is being instantiated, such values can be changed freely.
It is not defined an
idfor the Vm. Theidis defined when the Vm is submitted to aDatacenterBroker. -
VmSimple
public VmSimple(long id, double mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.
To change these values, use the respective setters. While the Vm is being instantiated, such values can be changed freely.
It receives the amount of MIPS as a double value but converts it internally to a
long. The method is just provided as a handy-way to create a Vm using a double value for MIPS that usually is generated from some computations.NOTE: The Vm will use a
CloudletSchedulerTimeSharedby default. If you need to change that, just callVmAbstract.setCloudletScheduler(CloudletScheduler). -
VmSimple
public VmSimple(long id, long mipsCapacity, long pesNumber) Creates a Vm with 1024 MEGA of RAM, 100 Megabits/s of Bandwidth and 1024 MEGA of Storage Size.
To change these values, use the respective setters. While the Vm is being instantiated, such values can be changed freely.
NOTE: The Vm will use a
CloudletSchedulerTimeSharedby default. If you need to change that, just callVmAbstract.setCloudletScheduler(CloudletScheduler).
-
-
Method Details
-
toString
-
compareTo
Compare this Vm with another one based onVmAbstract.getTotalMipsCapacity().- Parameters:
obj- the Vm to compare to- Returns:
-