Class: LS4::WeightMemberService

Inherits:
WeightService show all
Defined in:
lib/ls4/service/weight.rb

Instance Method Summary collapse

Methods inherited from WeightService

#get_registered_rsids, #get_weight, #on_change, #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

#initializeWeightMemberService

Returns a new instance of WeightMemberService.



117
118
119
# File 'lib/ls4/service/weight.rb', line 117

def initialize
	super
end

Instance Method Details

#runObject



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