Sha256: 7f8b3d96c768341ba8a08dc397ab06efa795e6f337920605730865de63c19b43

Contents?: true

Size: 1.02 KB

Versions: 45

Compression:

Stored size: 1.02 KB

Contents

require "ldclient-rb/interfaces"
require "ldclient-rb/impl/store_data_set_sorter"

module LaunchDarkly
  module Impl
    #
    # Provides additional behavior that the client requires before or after feature store operations.
    # Currently this just means sorting the data set for init(). In the future we may also use this
    # to provide an update listener capability.
    #
    class FeatureStoreClientWrapper
      include Interfaces::FeatureStore

      def initialize(store)
        @store = store
      end

      def init(all_data)
        @store.init(FeatureStoreDataSetSorter.sort_all_collections(all_data))
      end

      def get(kind, key)
        @store.get(kind, key)
      end

      def all(kind)
        @store.all(kind)
      end

      def upsert(kind, item)
        @store.upsert(kind, item)
      end

      def delete(kind, key, version)
        @store.delete(kind, key, version)
      end

      def initialized?
        @store.initialized?
      end

      def stop
        @store.stop
      end
    end
  end
end

Version data entries

45 entries across 45 versions & 2 rubygems

Version Path
launchdarkly-server-sdk-7.1.0 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-7.0.4 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-7.0.3 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-7.0.2 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-7.0.1 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-7.0.0 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.4.0 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.3.4 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.3.3 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.3.2 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.3.1 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.3.0 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.5 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.4 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.3 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.2 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.1 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.2.0 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.1.1 lib/ldclient-rb/impl/store_client_wrapper.rb
launchdarkly-server-sdk-6.1.0 lib/ldclient-rb/impl/store_client_wrapper.rb