Interface Startable
- All Known Subinterfaces:
Cloudlet,CustomerEntity,ExecDelayable,Host,Lifetimed,Machine<T>,PhysicalMachine,SubmissionDelayable,Vm
- All Known Implementing Classes:
CloudletAbstract,CloudletSimple,CustomerEntityAbstract,ExecDelayableAbstract,HostAbstract,HostSimple,NetworkCloudlet,NetworkHost,NetworkVm,StartableAbstract,VmAbstract,VmGroup,VmSimple
public interface Startable
An entity that can be started and stopped.
- Since:
- CloudSim Plus 8.2.0
- Author:
- Manoel Campos da Silva Filho
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates that some attribute was not set and therefore its value should be ignored. -
Method Summary
Modifier and TypeMethodDescriptiondoubledoubleGets the last time the entity was running some process orNOT_ASSIGNEDif it has not been busy yet.doubledoubledefault booleanbooleansetFinishTime(double stopTime) Sets the time the entity was stopped (in seconds).setLastBusyTime(double time) Set the last time the entity was running some process.setStartTime(double startTime) Sets the current entity startup time.
-
Field Details
-
NOT_ASSIGNED
static final int NOT_ASSIGNEDIndicates that some attribute was not set and therefore its value should be ignored.- See Also:
-
-
Method Details
-
getStartTime
double getStartTime()- Returns:
- the last time the machine was started up (in seconds);
or
NOT_ASSIGNEDif it was not started yet.
-
hasStarted
default boolean hasStarted()- Returns:
- true if the entity has started and it's not finished yet; false otherwise.
-
isFinished
boolean isFinished()- Returns:
- true if this entity has finished execution; false otherwise
-
setStartTime
Sets the current entity startup time. The valueNOT_ASSIGNEDmeans it was not started yet.- Parameters:
startTime- the start time to set (in seconds)- Returns:
- this entity
-
getFinishTime
double getFinishTime()- Returns:
- the time the entity was stopped (in seconds);
or
NOT_ASSIGNEDif it has not stopped or has not even started yet.
-
setFinishTime
Sets the time the entity was stopped (in seconds). The valueNOT_ASSIGNEDmeans the entity has not stopped or has not even started yet.- Parameters:
stopTime- the stop time to set (in seconds)- Returns:
- this entity
-
getLastBusyTime
double getLastBusyTime()Gets the last time the entity was running some process orNOT_ASSIGNEDif it has not been busy yet.- Returns:
- the last busy time (in seconds)
-
setLastBusyTime
Set the last time the entity was running some process.- Parameters:
time- the time to set (NOT_ASSIGNEDto indicate the entity has not been busy yet)- Returns:
- this entity
-
getSimulation
Simulation getSimulation()- Returns:
- the
CloudSimPlusinstance that represents the simulation this Entity belongs to.
-
getTotalExecutionTime
double getTotalExecutionTime()- Returns:
- the total execution time of the entity so far (in seconds), if the entity has finished already or not.
-