Class: SISFC::Event
Constant Summary collapse
- ET_REQUEST_GENERATION =
0
- ET_REQUEST_ARRIVAL =
1
- ET_REQUEST_FORWARDING =
2
- ET_WORKFLOW_STEP_COMPLETED =
3
- ET_REQUEST_CLOSURE =
4
- ET_END_OF_SIMULATION =
ET_VM_SUSPEND = 5 ET_VM_RESUME = 6
100
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
should this be attr_accessor instead?.
-
#destination ⇒ Object
readonly
should this be attr_accessor instead?.
-
#time ⇒ Object
readonly
should this be attr_accessor instead?.
-
#type ⇒ Object
readonly
should this be attr_accessor instead?.
Instance Method Summary collapse
- #<=>(event) ⇒ Object
-
#initialize(type, data, time, destination) ⇒ Event
constructor
A new instance of Event.
- #to_s ⇒ Object
Constructor Details
#initialize(type, data, time, destination) ⇒ Event
Returns a new instance of Event.
22 23 24 25 26 27 |
# File 'lib/sisfc/event.rb', line 22 def initialize(type, data, time, destination) @type = type @data = data @time = time @destination = destination end |
Instance Attribute Details
#data ⇒ Object (readonly)
should this be attr_accessor instead?
20 21 22 |
# File 'lib/sisfc/event.rb', line 20 def data @data end |
#destination ⇒ Object (readonly)
should this be attr_accessor instead?
20 21 22 |
# File 'lib/sisfc/event.rb', line 20 def destination @destination end |
#time ⇒ Object (readonly)
should this be attr_accessor instead?
20 21 22 |
# File 'lib/sisfc/event.rb', line 20 def time @time end |
#type ⇒ Object (readonly)
should this be attr_accessor instead?
20 21 22 |
# File 'lib/sisfc/event.rb', line 20 def type @type end |
Instance Method Details
#<=>(event) ⇒ Object
29 30 31 |
# File 'lib/sisfc/event.rb', line 29 def <=> (event) @time <=> event.time end |
#to_s ⇒ Object
33 34 35 |
# File 'lib/sisfc/event.rb', line 33 def to_s "Event type: #{@type}, data: #{@data}, time: #{@time}, #{@destination}" end |