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 Details

    • NOT_ASSIGNED

      static final int NOT_ASSIGNED
      Indicates 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_ASSIGNED if 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

      Startable setStartTime(double startTime)
      Sets the current entity startup time. The value NOT_ASSIGNED means 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_ASSIGNED if it has not stopped or has not even started yet.
    • setFinishTime

      Startable setFinishTime(double stopTime)
      Sets the time the entity was stopped (in seconds). The value NOT_ASSIGNED means 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 or NOT_ASSIGNED if it has not been busy yet.
      Returns:
      the last busy time (in seconds)
    • setLastBusyTime

      Startable setLastBusyTime(double time)
      Set the last time the entity was running some process.
      Parameters:
      time - the time to set (NOT_ASSIGNED to indicate the entity has not been busy yet)
      Returns:
      this entity
    • getSimulation

      Simulation getSimulation()
      Returns:
      the CloudSimPlus instance 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.