Class: RServiceBus2::SagaStorage

Inherits:
Object
  • Object
show all
Defined in:
lib/rservicebus2/saga_storage.rb

Overview

Saga Storage

Class Method Summary collapse

Class Method Details

.get(uri) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
# File 'lib/rservicebus2/saga_storage.rb', line 4

def self.get(uri)
  case uri.scheme
  when 'dir'
    require 'rservicebus2/saga_storage/dir'
    return SagaStorageDir.new(uri)
  when 'inmem'
    require 'rservicebus2/saga_storage/inmemory'
    return SagaStorageInMemory.new(uri)
  else
    abort("Scheme, #{uri.scheme}, not recognised when configuring
      SagaStorage, #{uri}")
  end
end