Class CloudSimTags

java.lang.Object
org.cloudbus.cloudsim.core.CloudSimTags

public final class CloudSimTags
extends Object
Contains various static command tags that indicate 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
  • Field Details

    • END_OF_SIMULATION

      public static final int END_OF_SIMULATION
      Denotes the end of simulation. Despite it has a negative value, it isn't a priority event.
      See Also:
      Constant Field Values
    • DATACENTER_REGISTRATION_REQUEST

      public static final int DATACENTER_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.
      See Also:
      Constant Field Values
    • DATACENTER_LIST_REQUEST

      public static final int DATACENTER_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.
      See Also:
      Constant Field Values
    • REGISTER_REGIONAL_CIS

      public static final int 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.
      See Also:
      Constant Field Values
    • REQUEST_REGIONAL_CIS

      public static final int REQUEST_REGIONAL_CIS
      Denotes a request to get a list of other regional CIS entities from the system CIS entity.
      See Also:
      Constant Field Values
    • ICMP_PKT_SUBMIT

      public static final int ICMP_PKT_SUBMIT
      This tag is used by an entity to send ping requests.
      See Also:
      Constant Field Values
    • ICMP_PKT_RETURN

      public static final int ICMP_PKT_RETURN
      This tag is used to return the ping request back to sender.
      See Also:
      Constant Field Values
    • CLOUDLET_RETURN

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_SUBMIT

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_SUBMIT_ACK

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_CANCEL

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_PAUSE

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_PAUSE_ACK

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_RESUME

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_RESUME_ACK

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_READY

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_FAIL

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_FINISH

      public static final int 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.

      See Also:
      Constant Field Values
    • CLOUDLET_KILL

      public static final int 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.
      See Also:
      Constant Field Values
    • CLOUDLET_UPDATE_ATTRIBUTES

      public static final int 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.

      See Also:
      Constant Field Values
    • VM_CREATE_ACK

      public static final int VM_CREATE_ACK
      Denotes a request to create a new VM in a Datacenter with 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().
      See Also:
      Constant Field Values
    • VM_DESTROY

      public static final int 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.
      See Also:
      Constant Field Values
    • VM_DESTROY_ACK

      public static final int 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.
      See Also:
      Constant Field Values
    • VM_MIGRATE

      public static final int 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.
      See Also:
      Constant Field Values
    • VM_MIGRATE_ACK

      public static final int 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_MIGRATE, Constant Field Values
    • VM_UPDATE_CLOUDLET_PROCESSING

      public static final int 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.
      See Also:
      Constant Field Values
    • VM_VERTICAL_SCALING

      public static final int 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.
      See Also:
      Constant Field Values
    • NETWORK_EVENT_UP

      public static final int NETWORK_EVENT_UP
      Denotes the transmission of packets up through the network topology.
      See Also:
      Constant Field Values
    • NETWORK_EVENT_SEND

      public static final int NETWORK_EVENT_SEND
      See Also:
      Constant Field Values
    • NETWORK_EVENT_DOWN

      public static final int NETWORK_EVENT_DOWN
      Denotes the transmission of packets down through the network topology.
      See Also:
      Constant Field Values
    • NETWORK_EVENT_HOST

      public static final int NETWORK_EVENT_HOST
      See Also:
      Constant Field Values
    • FAILURE

      public static final int FAILURE
      Denotes failure events such as hosts or VMs failures.
      See Also:
      Constant Field Values
    • HOST_FAILURE

      public static final int HOST_FAILURE
      Denotes a request to generate a host failure.
      See Also:
      Constant Field Values
    • HOST_ADD

      public static final int 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 to the Datacenter where the message is being sent to. The source of such events is the CloudInformationService.
      See Also:
      Constant Field Values
    • HOST_REMOVE

      public static final int 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.
      See Also:
      Constant Field Values
    • POWER_MEASUREMENT

      public static final int POWER_MEASUREMENT
      Denotes a power measurement performed periodically by a PowerMeter on entities having a PowerModel, such as Datacenters and Hosts.
      See Also:
      Constant Field Values