Class Ruote::CompositeStorage
In: lib/ruote/storage/composite_storage.rb
Parent: Object

This storage allows for mixing of storage implementation or simply mixing of storage physical backend.

  opts = {}

  dashboard =
    Ruote::Dashboard.new(
      Ruote::Worker.new(
        Ruote::CompositeStorage.new(
          Ruote::FsStorage.new('ruote_work', opts),
          'msgs' => Ruote::HashStorage.new(opts))))

In this example, everything goes to the FsStorage, except the messages (msgs) that go to an in-memory storage.

Methods

add_type   delegate   new   storage_for  

Included Modules

StorageBase

Constants

TYPES = %w[ variables msgs expressions errors schedules configurations workitems ]

Public Class methods

A class method ‘delegate’, to tell this storage how to deal with each method composing a storage.

Followed by a list of ‘delegations’.

Public Instance methods

The dilemma for the CompositeStorage with add_type is "to which real storage should the new type get added". The solution: do nothing.

Protected Instance methods

[Validate]