Class: RServiceBus2::StateManager
- Inherits:
-
Object
- Object
- RServiceBus2::StateManager
- Defined in:
- lib/rservicebus2/state_manager.rb
Overview
State Manager
Instance Method Summary collapse
Instance Method Details
#begin ⇒ Object
18 19 20 |
# File 'lib/rservicebus2/state_manager.rb', line 18 def begin @state_storage.begin unless @state_storage.nil? end |
#commit ⇒ Object
26 27 28 |
# File 'lib/rservicebus2/state_manager.rb', line 26 def commit @state_storage.commit unless @state_storage.nil? end |
#get(handler) ⇒ Object
22 23 24 |
# File 'lib/rservicebus2/state_manager.rb', line 22 def get(handler) @state_storage.get(handler) unless @state_storage.nil? end |
#required ⇒ Object
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/rservicebus2/state_manager.rb', line 7 def required # Check if the State Dir has been specified # If it has, make sure it exists, and is writable string = RServiceBus2.get_value('STATE_URI') string = 'dir:///tmp' if string.nil? uri = URI.parse(string) @state_storage = StateStorage.get(uri) end |