Class: RServiceBus::StateManager

Inherits:
Object
  • Object
show all
Defined in:
lib/rservicebus/StateManager.rb

Instance Method Summary collapse

Instance Method Details

#BeginObject

Start



23
24
25
# File 'lib/rservicebus/StateManager.rb', line 23

def Begin
    @stateStorage.Begin unless @stateStorage.nil?
end

#CommitObject

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

#RequiredObject



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