Class: LS4::MembershipClientService
- Inherits:
-
MembershipService
- Object
- EventBus::Singleton
- Service
- MembershipService
- LS4::MembershipClientService
- Defined in:
- lib/ls4/service/membership.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize ⇒ MembershipClientService
constructor
A new instance of MembershipClientService.
- #run ⇒ Object
Methods inherited from MembershipService
#get_active_rsids, #get_all_nodes, #get_node, #get_session_nid, #is_fault, #on_fault_list_change, #on_membership_change, #shutdown, #stat_fault_info, #stat_membership_info, #stat_replset_info
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 ⇒ MembershipClientService
Returns a new instance of MembershipClientService.
230 231 232 |
# File 'lib/ls4/service/membership.rb', line 230 def initialize super end |
Instance Method Details
#run ⇒ Object
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/ls4/service/membership.rb', line 234 def run super SyncBus.register_callback(SYNC_MEMBERSHIP, @membership.get_hash) do |obj| @membership.from_msgpack(obj) on_membership_change @membership.get_hash end SyncBus.register_callback(SYNC_FAULT_LIST, @fault_list.get_hash) do |obj| @fault_list.from_msgpack(obj) on_fault_list_change @fault_list.get_hash end end |