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.
252 253 254 255 256 257 258 259 |
# File 'lib/nanite/packets.rb', line 252 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.
250 251 252 |
# File 'lib/nanite/packets.rb', line 250 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
250 251 252 |
# File 'lib/nanite/packets.rb', line 250 def @message end |
#messagekey ⇒ Object
Returns the value of attribute messagekey.
250 251 252 |
# File 'lib/nanite/packets.rb', line 250 def @messagekey end |
#to ⇒ Object
Returns the value of attribute to.
250 251 252 |
# File 'lib/nanite/packets.rb', line 250 def to @to end |
#token ⇒ Object
Returns the value of attribute token.
250 251 252 |
# File 'lib/nanite/packets.rb', line 250 def token @token end |
Class Method Details
.json_create(o) ⇒ Object
261 262 263 264 |
# File 'lib/nanite/packets.rb', line 261 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
266 267 268 |
# File 'lib/nanite/packets.rb', line 266 def to_s "#{super} <#{token}> from #{id_to_s(from)}, key #{}" end |