Class: LS4::WeightManagerService
- Inherits:
-
WeightService
- Object
- EventBus::Singleton
- Service
- WeightService
- LS4::WeightManagerService
- Defined in:
- lib/ls4/service/weight.rb
Instance Method Summary collapse
-
#initialize ⇒ WeightManagerService
constructor
A new instance of WeightManagerService.
- #reset_weight(rsid) ⇒ Object
- #rpc_reset_replset_weight(rsid) ⇒ Object
- #rpc_set_replset_weight(rsid, weight) ⇒ Object
- #set_weight(rsid, weight) ⇒ Object
Methods inherited from WeightService
#get_registered_rsids, #get_weight, #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 ⇒ WeightManagerService
Returns a new instance of WeightManagerService.
70 71 72 |
# File 'lib/ls4/service/weight.rb', line 70 def initialize super end |
Instance Method Details
#reset_weight(rsid) ⇒ Object
83 84 85 86 87 88 89 90 |
# File 'lib/ls4/service/weight.rb', line 83 def reset_weight(rsid) if @winfo.reset_weight(rsid) on_change true else false end end |
#rpc_reset_replset_weight(rsid) ⇒ Object
96 97 98 |
# File 'lib/ls4/service/weight.rb', line 96 def rpc_reset_replset_weight(rsid) reset_weight(rsid) end |
#rpc_set_replset_weight(rsid, weight) ⇒ Object
92 93 94 |
# File 'lib/ls4/service/weight.rb', line 92 def rpc_set_replset_weight(rsid, weight) set_weight(rsid, weight) end |
#set_weight(rsid, weight) ⇒ Object
74 75 76 77 78 79 80 81 |
# File 'lib/ls4/service/weight.rb', line 74 def set_weight(rsid, weight) if @winfo.set_weight(rsid, weight) on_change true else false end end |