Class: LS4::HeartbeatMemberService
- Inherits:
-
HeartbeatClientService
- Object
- EventBus::Singleton
- Service
- HeartbeatClientService
- LS4::HeartbeatMemberService
- Defined in:
- lib/ls4/service/heartbeat.rb
Instance Method Summary collapse
-
#initialize ⇒ HeartbeatMemberService
constructor
A new instance of HeartbeatMemberService.
-
#on_timer ⇒ Object
def ack_heartbeat(hbres) super.
Methods inherited from HeartbeatClientService
#do_heartbeat_blocking, #heartbeat_blocking!, #run, #shutdown
Methods inherited from Service
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
Constructor Details
#initialize ⇒ HeartbeatMemberService
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_timer ⇒ Object
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 |