Class: LS4::StandaloneSyncService
- Inherits:
-
SyncServerService
- Object
- EventBus::Singleton
- Service
- SyncService
- SyncServerService
- LS4::StandaloneSyncService
- Defined in:
- lib/ls4/service/sync.rb
Instance Method Summary collapse
-
#initialize ⇒ StandaloneSyncService
constructor
A new instance of StandaloneSyncService.
- #register_callback(id, initial_hash, &block) ⇒ Object
- #sync_blocking! ⇒ Object
- #try_sync ⇒ Object
Methods inherited from SyncServerService
#check_hash, #rpc_sync_config, #update
Methods inherited from SyncService
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 ⇒ StandaloneSyncService
Returns a new instance of StandaloneSyncService.
157 158 159 160 161 |
# File 'lib/ls4/service/sync.rb', line 157 def initialize @callback_array = [] @client_hash_array = [] super end |
Instance Method Details
#register_callback(id, initial_hash, &block) ⇒ Object
163 164 165 166 167 |
# File 'lib/ls4/service/sync.rb', line 163 def register_callback(id, initial_hash, &block) @callback_array[id] = block @client_hash_array[id] = initial_hash nil end |
#sync_blocking! ⇒ Object
174 175 176 |
# File 'lib/ls4/service/sync.rb', line 174 def sync_blocking! do_sync.join end |
#try_sync ⇒ Object
169 170 171 172 |
# File 'lib/ls4/service/sync.rb', line 169 def try_sync do_sync nil end |