Sha256: 3875195c41896154ee93cb196d3058ce443462c4b8f4f28211916f353c56eb0a

Contents?: true

Size: 561 Bytes

Versions: 1

Compression:

Stored size: 561 Bytes

Contents

# frozen_string_literal: true

module SalesforceStreamer
  # Store values for a given key in a sorted sequence
  # Retrieves the highest value given a key
  class ReplayPersistence
    class << self
      def record(key, value)
        Log.debug { "Recording #{key}=#{value}" }
        Configuration.instance.persistence_adapter&.record key, value
      end

      def retrieve(key)
        Configuration.instance.persistence_adapter&.retrieve(key).tap do |v|
        Log.debug { "Retrieved for #{key} #{ v || 'nil' }" }
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
salesforce_streamer-0.2.3 lib/salesforce_streamer/replay_persistence.rb