Class: RServiceBus::StateStorage_InMemory
- Inherits:
-
Object
- Object
- RServiceBus::StateStorage_InMemory
- Defined in:
- lib/rservicebus/StateStorage/InMemory.rb
Instance Method Summary collapse
-
#Begin ⇒ Object
Start.
-
#Commit ⇒ Object
Finish.
-
#Get(handler) ⇒ Object
Get.
-
#initialize(uri) ⇒ StateStorage_InMemory
constructor
A new instance of StateStorage_InMemory.
Constructor Details
#initialize(uri) ⇒ StateStorage_InMemory
Returns a new instance of StateStorage_InMemory.
5 6 7 |
# File 'lib/rservicebus/StateStorage/InMemory.rb', line 5 def initialize( uri ) @hash = Hash.new end |
Instance Method Details
#Begin ⇒ Object
Start
10 11 12 |
# File 'lib/rservicebus/StateStorage/InMemory.rb', line 10 def Begin @list = Array.new end |
#Commit ⇒ Object
Finish
23 24 25 26 27 |
# File 'lib/rservicebus/StateStorage/InMemory.rb', line 23 def Commit @list.each do |e| @hash[ e['name'] ] = e['hash'] end end |
#Get(handler) ⇒ Object
Get
15 16 17 18 19 20 |
# File 'lib/rservicebus/StateStorage/InMemory.rb', line 15 def Get( handler ) hash = @hash[handler.class.name] @list << Hash['name', handler.class.name, 'hash', hash] return hash end |