Class: Evinrude::ConfigChangeQueueEntry

Inherits:
Object
  • Object
show all
Defined in:
lib/evinrude/config_change_queue_entry.rb,
lib/evinrude/config_change_queue_entry/add_node.rb,
lib/evinrude/config_change_queue_entry/remove_node.rb

Direct Known Subclasses

AddNode, RemoveNode

Defined Under Namespace

Classes: AddNode, RemoveNode

Instance Method Summary collapse

Constructor Details

#initialize(msg, conn = nil) ⇒ ConfigChangeQueueEntry

Returns a new instance of ConfigChangeQueueEntry.



3
4
5
# File 'lib/evinrude/config_change_queue_entry.rb', line 3

def initialize(msg, conn = nil)
  @msg, @conn = msg, conn
end

Instance Method Details

#node_infoObject



7
8
9
# File 'lib/evinrude/config_change_queue_entry.rb', line 7

def node_info
  @msg.node_info
end

#send_redirect_reply(leader_info) ⇒ Object



15
16
17
# File 'lib/evinrude/config_change_queue_entry.rb', line 15

def send_redirect_reply(leader_info)
  @conn.send_reply(reply_class.new(success: false, leader_info: leader_info))
end

#send_successful_replyObject



11
12
13
# File 'lib/evinrude/config_change_queue_entry.rb', line 11

def send_successful_reply
  @conn.send_reply(reply_class.new(success: true))
end