CloudSimEvent

public final class CloudSimEvent implements SimEvent

This class represents a simulation event which is passed between the entities in the simulation.

Author:Costas Simatos

See also: CloudSim, SimEntity

Constructors

CloudSimEvent

public CloudSimEvent(double delay, SimEntity src, SimEntity dest, int tag, Object data)

Creates a Type.SEND CloudSimEvent.

Parameters:
  • delay – how many seconds after the current simulation time the event should be scheduled
  • src – the source entity which is sending the message
  • dest – the source entity which has to receive the message
  • tag – the tag that identifies the type of the message (which is used by the destination entity to perform operations based on the message type)
  • data – the data attached to the message, that depends on the message tag

CloudSimEvent

public CloudSimEvent(double delay, SimEntity dest, int tag, Object data)

Creates a Type.SEND CloudSimEvent where the sender and destination are the same entity.

Parameters:
  • delay – how many seconds after the current simulation time the event should be scheduled
  • dest – the source entity which has to receive the message
  • tag – the tag that identifies the type of the message (which is used by the destination entity to perform operations based on the message type)
  • data – the data attached to the message, that depends on the message tag

CloudSimEvent

public CloudSimEvent(SimEntity dest, int tag)

Creates a Type.SEND CloudSimEvent where the sender and destination are the same entity, the message has no delay and no data.

Parameters:
  • dest – the source entity which has to receive the message
  • tag – the tag that identifies the type of the message (which is used by the destination entity to perform operations based on the message type)

CloudSimEvent

public CloudSimEvent(Type type, double delay, SimEntity src)

Creates a CloudSimEvent where the destination entity and tag are not set yet. Furthermore, there will be not data associated to the event.

Parameters:
  • delay – how many seconds after the current simulation time the event should be scheduled

CloudSimEvent

public CloudSimEvent(SimEvent src)

Creates a CloudSimEvent cloning another given one.

Parameters:
  • src – the event to clone

CloudSimEvent

public CloudSimEvent(Type type, double delay, SimEntity src, SimEntity dest, int tag, Object data)

Creates a CloudSimEvent.

Parameters:
  • type – the internal type of the event
  • delay – how many seconds after the current simulation time the event should be scheduled
  • src – the source entity which is sending the message
  • dest – the source entity which has to receive the message
  • tag – the tag that identifies the type of the message (which is used by the destination entity to perform operations based on the message type)
  • data – the data attached to the message, that depends on the message tag

Methods

compareTo

public int compareTo(SimEvent evt)

getData

public Object getData()

getDestination

public SimEntity getDestination()

getEndWaitingTime

public double getEndWaitingTime()

getListener

public EventListener<? extends EventInfo> getListener()

getSerial

public long getSerial()

getSimulation

public Simulation getSimulation()

getSource

public SimEntity getSource()

getTag

public int getTag()

getTime

public double getTime()

getType

public Type getType()

scheduledBy

public SimEntity scheduledBy()

setDestination

public final SimEvent setDestination(SimEntity destination)

setSerial

public void setSerial(long serial)

setSimulation

public final SimEvent setSimulation(Simulation simulation)

setSource

public final SimEvent setSource(SimEntity source)

toString

public String toString()