Class: Nanite::IntermediateMessage
- Defined in:
- lib/nanite/packets.rb
Overview
packet that means an intermediate status notification sent from actor to mapper. is appended to a list of messages matching messagekey.
from is sender identity messagekey is a string that can become part of a redis key, which identifies the name under which the message is stored message is arbitrary data that is transferred from actor, an intermediate result of actor’s work token is a generated request id that mapper uses to identify replies to is identity of the node result should be delivered to
Instance Attribute Summary collapse
-
#from ⇒ Object
Returns the value of attribute from.
-
#message ⇒ Object
Returns the value of attribute message.
-
#messagekey ⇒ Object
Returns the value of attribute messagekey.
-
#to ⇒ Object
Returns the value of attribute to.
-
#token ⇒ Object
Returns the value of attribute token.
Attributes inherited from Packet
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(token, to, from, messagekey, message, size = nil) ⇒ IntermediateMessage
constructor
A new instance of IntermediateMessage.
- #to_s ⇒ Object
Methods inherited from Packet
Constructor Details
#initialize(token, to, from, messagekey, message, size = nil) ⇒ IntermediateMessage
Returns a new instance of IntermediateMessage.
297 298 299 300 301 302 303 304 |
# File 'lib/nanite/packets.rb', line 297 def initialize(token, to, from, , , size=nil) @token = token @to = to @from = from @messagekey = @message = @size = size end |
Instance Attribute Details
#from ⇒ Object
Returns the value of attribute from.
295 296 297 |
# File 'lib/nanite/packets.rb', line 295 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
295 296 297 |
# File 'lib/nanite/packets.rb', line 295 def @message end |
#messagekey ⇒ Object
Returns the value of attribute messagekey.
295 296 297 |
# File 'lib/nanite/packets.rb', line 295 def @messagekey end |
#to ⇒ Object
Returns the value of attribute to.
295 296 297 |
# File 'lib/nanite/packets.rb', line 295 def to @to end |
#token ⇒ Object
Returns the value of attribute token.
295 296 297 |
# File 'lib/nanite/packets.rb', line 295 def token @token end |
Class Method Details
.json_create(o) ⇒ Object
306 307 308 309 |
# File 'lib/nanite/packets.rb', line 306 def self.json_create(o) i = o['data'] new(i['token'], i['to'], i['from'], i['messagekey'], i['message'], o['size']) end |
Instance Method Details
#to_s ⇒ Object
311 312 313 |
# File 'lib/nanite/packets.rb', line 311 def to_s "#{super} <#{token}> from #{id_to_s(from)}, key #{}" end |