Sha256: 2979e3dce4daffb881bc5ba6bf42041b5e736272d51d41b0299ca9b3ef54d7b6

Contents?: true

Size: 679 Bytes

Versions: 16

Compression:

Stored size: 679 Bytes

Contents

module SplitIoClient
  module Cache
    module Repositories
      # Repository which forwards impressions interface to the selected adapter
      class ImpressionsRepository < Repository
        extend Forwardable
        def_delegators :@adapter, :add, :add_bulk, :get_batch, :empty?

        def initialize(adapter)
          @adapter = case adapter.class.to_s
          when 'SplitIoClient::Cache::Adapters::MemoryAdapter'
            Repositories::Impressions::MemoryRepository.new(adapter)
          when 'SplitIoClient::Cache::Adapters::RedisAdapter'
            Repositories::Impressions::RedisRepository.new(adapter)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
splitclient-rb-5.1.4.pre.rc1-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.4.pre.rc1 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.3.pre.rc1-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.3.pre.rc1 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2.pre.rc1-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2.pre.rc1 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2.pre.rc21 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.2.pre.rc21-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1.pre.rc2-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1.pre.rc2 lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1.pre.rc1-java lib/splitclient-rb/cache/repositories/impressions_repository.rb
splitclient-rb-5.1.1.pre.rc1 lib/splitclient-rb/cache/repositories/impressions_repository.rb