Class: RServiceBus::StateManager
- Inherits:
-
Object
- Object
- RServiceBus::StateManager
- Defined in:
- lib/rservicebus/StateManager.rb
Instance Method Summary collapse
-
#Begin ⇒ Object
Start.
-
#Commit ⇒ Object
Finish.
-
#Get(handler) ⇒ Object
Get.
- #Required ⇒ Object
Instance Method Details
#Begin ⇒ Object
Start
23 24 25 |
# File 'lib/rservicebus/StateManager.rb', line 23 def Begin @stateStorage.Begin unless @stateStorage.nil? end |
#Commit ⇒ Object
Finish
33 34 35 |
# File 'lib/rservicebus/StateManager.rb', line 33 def Commit @stateStorage.Commit unless @stateStorage.nil? end |
#Get(handler) ⇒ Object
Get
28 29 30 |
# File 'lib/rservicebus/StateManager.rb', line 28 def Get( handler ) return @stateStorage.Get( handler ) unless @stateStorage.nil? end |
#Required ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/rservicebus/StateManager.rb', line 8 def Required #Check if the State Dir has been specified #If it has, make sure it exists, and is writable string = RServiceBus.getValue('STATE_URI') if string.nil? then string = 'dir:///tmp' end uri = URI.parse( string ) @stateStorage = StateStorage.Get( uri ) end |