Enum Class CloudSimTag

java.lang.Object
java.lang.Enum<CloudSimTag>
org.cloudbus.cloudsim.core.CloudSimTag
All Implemented Interfaces:
Serializable, Comparable<CloudSimTag>, Constable

public enum CloudSimTag extends Enum<CloudSimTag> implements Comparable<CloudSimTag>
Tags indicating a type of action that needs to be undertaken by CloudSim entities when they receive or send events. NOTE: To avoid conflicts with other tags, CloudSim reserves numbers lower than 300 and the number 9600.
Since:
CloudSim Toolkit 1.0
Author:
Manzur Murshed, Rajkumar Buyya, Anthony Sulistio, Manoel Campos da Silva Filho
  • Enum Constant Details

    • NONE

      public static final CloudSimTag NONE
      An unclassified tag.
    • ENTITY_SHUTDOWN

      public static final CloudSimTag ENTITY_SHUTDOWN
      Tag used for requesting an entity to shut down. That ensures a graceful shutdown, after other entity events are processed.
    • SIMULATION_END

      public static final CloudSimTag SIMULATION_END
      Denotes the end of simulation.
    • DC_REGISTRATION_REQUEST

      public static final CloudSimTag DC_REGISTRATION_REQUEST
      Denotes a request from a Datacenter to register itself. This tag is normally used between CloudInformationService and Datacenter entities. When such a SimEvent is sent, the SimEvent.getData() must be a Datacenter object.
    • DC_LIST_REQUEST

      public static final CloudSimTag DC_LIST_REQUEST
      Denotes a request from a broker to a CloudInformationService to get the list of all Datacenters, including the ones that can support advanced reservation.
    • REGISTER_REGIONAL_CIS

      public static final CloudSimTag REGISTER_REGIONAL_CIS
      Denotes a request to register a CloudInformationService entity as a regional CIS. When such a SimEvent is sent, the SimEvent.getData() must be a CloudInformationService object.
    • REQUEST_REGIONAL_CIS

      public static final CloudSimTag REQUEST_REGIONAL_CIS
      Denotes a request to get a list of other regional CIS entities from the system CIS entity.
    • ICMP_PKT_SUBMIT

      public static final CloudSimTag ICMP_PKT_SUBMIT
      This tag is used by an entity to send ping requests.
    • ICMP_PKT_RETURN

      public static final CloudSimTag ICMP_PKT_RETURN
      This tag is used to return the ping request back to sender.
    • CLOUDLET_RETURN

      public static final CloudSimTag CLOUDLET_RETURN
      Denotes the return of a finished Cloudlet back to the sender. This tag is normally used by Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_SUBMIT

      public static final CloudSimTag CLOUDLET_SUBMIT
      Denotes the submission of a Cloudlet. This tag is normally used between a DatacenterBroker and Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_SUBMIT_ACK

      public static final CloudSimTag CLOUDLET_SUBMIT_ACK
      Denotes the submission of a Cloudlet with an acknowledgement. This tag is normally used between DatacenterBroker and Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_CANCEL

      public static final CloudSimTag CLOUDLET_CANCEL
      Cancels a Cloudlet submitted in the Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_PAUSE

      public static final CloudSimTag CLOUDLET_PAUSE
      Pauses a Cloudlet submitted in the Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_PAUSE_ACK

      public static final CloudSimTag CLOUDLET_PAUSE_ACK
      Pauses a Cloudlet submitted in the Datacenter entity with an acknowledgement. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_RESUME

      public static final CloudSimTag CLOUDLET_RESUME
      Resumes a Cloudlet submitted in the Datacenter entity. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_RESUME_ACK

      public static final CloudSimTag CLOUDLET_RESUME_ACK
      Resumes a Cloudlet submitted in the Datacenter entity with an acknowledgement. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_READY

      public static final CloudSimTag CLOUDLET_READY
      Request a Cloudlet to be set as ready to start executing inside a VM. This event is sent by a DatacenterBroker to itself to define the time when a specific Cloudlet should start executing. This tag is commonly used when Cloudlets are created from a trace file such as a Google Cluster Trace.

      When the status of a Cloudlet is set to Cloudlet.Status.READY, the Cloudlet can be selected to start running as soon as possible by a CloudletScheduler.

      When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_FAIL

      public static final CloudSimTag CLOUDLET_FAIL
      Request a Cloudlet to be set as failed. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_FINISH

      public static final CloudSimTag CLOUDLET_FINISH
      Requests an indefinite-length Cloudlet (negative value) to be finished by setting its length as the current number of processed MI. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.

      Events with a negative tag have higher priority. In this case, if a message with this tag is sent, it means that the Cloudlet has to be finished by replacing its negative length with an actual positive value. Only after that, the processing of Cloudlets can be updated. That is way this event must be processed before other events.

    • CLOUDLET_KILL

      public static final CloudSimTag CLOUDLET_KILL
      Requests a Cloudlet to be cancelled. The Cloudlet can be cancelled under user request or because another Cloudlet on which this one was dependent died. When an event of this type is sent, the SimEvent.getData() must be a Cloudlet object.
    • CLOUDLET_UPDATE_ATTRIBUTES

      public static final CloudSimTag CLOUDLET_UPDATE_ATTRIBUTES
      Request a Cloudlet to have its attributes changed. When an event of this type is sent, the SimEvent.getData() must be a Runnable that represents a no-argument and no-return function that will perform the Cloudlet attribute update. The Runnable most encapsulate everything needed to update the Cloudlet's attributes, including the Cloudlet which will be updated.

      Since the logic to update the attributes of a Cloudlet can be totally customized according to the researcher needs, there is no standard way to perform such an operation. As an example, you may want to reduce by half the number of PEs required by a Cloudlet from a list at a given time. This way, the Runnable function may be defined as a Lambda Expression as follows. Realize the cloudletList is considered to be accessible anywhere in the surrounding scope.

       Runnable runnable = () -> cloudletList.forEach(cloudlet -> cloudlet.setNumberOfPes(cloudlet.getNumberOfPes()/2));
       

      The runnable variable must be set as the data for the event to be sent with this tag.

    • VM_CREATE_RETRY

      public static final CloudSimTag VM_CREATE_RETRY
      Denotes a request to retry creating waiting VMs from a DatacenterBroker.
    • VM_CREATE_ACK

      public static final CloudSimTag VM_CREATE_ACK
      Denotes a request to create a new VM in a Datacenter where the SimEvent.getData() of the reply event is a Vm object.

      Using this tag, the Datacenter acknowledges the reception of the request. To check if the VM was in fact created inside the requested Datacenter one has only to call Vm.isCreated().

    • VM_DESTROY

      public static final CloudSimTag VM_DESTROY
      Denotes a request to destroy a VM in a Datacenter. When an event of this type is sent, the SimEvent.getData() must be a Vm object.
    • VM_DESTROY_ACK

      public static final CloudSimTag VM_DESTROY_ACK
      Denotes a request to destroy a new VM in a Datacenter with acknowledgement information sent by the Datacenter. When an event of this type is sent, the SimEvent.getData() must be a Vm object.
    • VM_MIGRATE

      public static final CloudSimTag VM_MIGRATE
      Denotes a request to finish the migration of a new VM in a Datacenter. When an event of this type is sent, the SimEvent.getData() must be a Map.Entry<Vm, Host> representing to which Host a VM must be migrated.

      If Host.NULL is given, the Datacenter will try to find a suitable Host when the migration request message is processed.

    • VM_MIGRATE_ACK

      public static final CloudSimTag VM_MIGRATE_ACK
      Denotes a request to finish the migration of a new VM in a Datacenter with acknowledgement information sent by the Datacenter.
      See Also:
    • VM_UPDATE_CLOUDLET_PROCESSING

      public static final CloudSimTag VM_UPDATE_CLOUDLET_PROCESSING
      Denotes an internal event generated in a Datacenter to notify itself to update the processing of cloudlets.

      When an event of this type is sent, the SimEvent.getData() can be a Host object to indicate that just the Cloudlets running in VMs inside such a Host must be updated. The Host is an optional parameter which if omitted, means that all Hosts from the Datacenter will have its cloudlets updated.

    • VM_VERTICAL_SCALING

      public static final CloudSimTag VM_VERTICAL_SCALING
      Denotes a request vertical scaling of VM resources such as Ram, Bandwidth or Pe. When an event of this type is sent, the SimEvent.getData() must be a VerticalVmScaling object.
    • NETWORK_EVENT_UP

      public static final CloudSimTag NETWORK_EVENT_UP
      Denotes the transmission of packets up through the network topology.
    • NETWORK_EVENT_SEND

      public static final CloudSimTag NETWORK_EVENT_SEND
    • NETWORK_EVENT_DOWN

      public static final CloudSimTag NETWORK_EVENT_DOWN
      Denotes the transmission of packets down through the network topology.
    • NETWORK_EVENT_HOST

      public static final CloudSimTag NETWORK_EVENT_HOST
      Denotes the transmission of packets targeting a given Host. The SimEvent.getData() must be a HostPacket to be processed.
    • FAILURE

      public static final CloudSimTag FAILURE
      Denotes failure events such as hosts or VMs failures.
    • HOST_FAILURE

      public static final CloudSimTag HOST_FAILURE
      Denotes a request to generate a host failure.
    • HOST_ADD

      public static final CloudSimTag HOST_ADD
      Denotes a request to a Datacenter to add a Host or list of Hosts to a Datacenter. The SimEvent.getData() must be a Host to be added to the Datacenter where the message is being sent to. The source of such events is the CloudInformationService.
    • HOST_REMOVE

      public static final CloudSimTag HOST_REMOVE
      Denotes a request to a Datacenter to remove a Host or list of Hosts from a Datacenter. The SimEvent.getData() must be the ID of the Host that will be removed from the Datacenter they belong to.

      For this event, it's used the ID instead of the Host itself because the Host instance with the specified ID should be looked into the Datacenter Host list in order to remove it. A Host should be removed in case of maintenance or failure, but there isn't such a distinction yet, so a failure is simulated to remove the Host. The source of such events is the CloudInformationService.

    • POWER_MEASUREMENT

      public static final CloudSimTag POWER_MEASUREMENT
      Denotes a power measurement performed periodically by a PowerMeter on entities having a PowerModel, such as Datacenters and Hosts.
    • HOST_POWER_ON

      public static final CloudSimTag HOST_POWER_ON
      Denotes a tag for starting up a Host inside a Datacenter. When such a SimEvent is sent, the SimEvent.getData() must be a Host object.
    • HOST_POWER_OFF

      public static final CloudSimTag HOST_POWER_OFF
      Denotes a tag for shutting down a Host inside a Datacenter. When such a SimEvent is sent, the SimEvent.getData() must be a Host object.
  • Method Details

    • values

      public static CloudSimTag[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CloudSimTag valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • priority

      public int priority()
      Gets the event tag priority. Negative values indicates higher priority.
    • between

      public boolean between(CloudSimTag startInclusive, CloudSimTag endInclusive)
      Checks if this tag is between a given range of tags, according to their Enum.ordinal() values.
      Parameters:
      startInclusive - the tag starting the range to check
      endInclusive - the tag finishing the range to check
      Returns: