Class: LS4::HeartbeatMemberService

Inherits:
HeartbeatClientService show all
Defined in:
lib/ls4/service/heartbeat.rb

Instance Method Summary collapse

Methods inherited from HeartbeatClientService

#do_heartbeat_blocking, #heartbeat_blocking!, #run, #shutdown

Methods inherited from Service

init

Methods included from EventBus::SingletonMixin

#ebus_bind!, #ebus_connect, extended

Methods included from EventBus::BusMixin

#ebus_all_slots, #ebus_disconnect!

Methods included from EventBus::DeclarerBase::Methods

#connect, #ebus_all_slots, #ebus_call_log, #ebus_call_slots, #ebus_signal_error, #ebus_signal_log, #ebus_signal_slots

Methods included from EventBus::DeclarerBase

#call_slot, #signal_slot

Constructor Details

#initializeHeartbeatMemberService

Returns a new instance of HeartbeatMemberService.



155
156
157
158
# File 'lib/ls4/service/heartbeat.rb', line 155

def initialize
	super
	@heartbeat_nid = ConfigBus.self_nid
end

Instance Method Details

#on_timerObject

def ack_heartbeat(hbres) super

if hbres.term # do nothing else # MembershipMemberService #register_self end

MembershipBus.try_register_node end



173
174
175
# File 'lib/ls4/service/heartbeat.rb', line 173

def on_timer
	MembershipBus.try_register_node
end