Class: RServiceBus2::StateStorage

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

Overview

State Storage

Class Method Summary collapse

Class Method Details

.get(uri) ⇒ Object



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

def self.get(uri)
  case uri.scheme
  when 'dir'
    require 'rservicebus2/state_storage/dir'
    StateStorageDir.new(uri)
  when 'inmem'
    require 'rservicebus2/state_storage/inmemory'
    StateStorageInMemory.new(uri)
  else
    abort("Scheme, #{uri.scheme}, not recognised when configuring StateStorage, #{uri}")
  end
end