Class: LS4::WeightMemberService
- Inherits:
-
WeightService
- Object
- EventBus::Singleton
- Service
- WeightService
- LS4::WeightMemberService
- Defined in:
- lib/ls4/service/weight.rb
Instance Method Summary collapse
-
#initialize ⇒ WeightMemberService
constructor
A new instance of WeightMemberService.
- #run ⇒ Object
Methods inherited from WeightService
#get_registered_rsids, #get_weight, #on_change, #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 ⇒ WeightMemberService
Returns a new instance of WeightMemberService.
117 118 119 |
# File 'lib/ls4/service/weight.rb', line 117 def initialize super end |
Instance Method Details
#run ⇒ Object
121 122 123 124 125 126 127 128 129 130 |
# File 'lib/ls4/service/weight.rb', line 121 def run super SyncBus.register_callback(SYNC_REPLSET_WEIGHT, @winfo.get_hash) do |obj| @winfo.from_msgpack(obj) on_change @winfo.get_hash end end |