Sha256: 401262b7f0c979a33fb0426d4f80cfaeabe5ef755752a7dc64dde3a0da472439

Contents?: true

Size: 558 Bytes

Versions: 2

Compression:

Stored size: 558 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

2 entries across 2 versions & 1 rubygems

Version Path
salesforce_streamer-0.2.2 lib/salesforce_streamer/replay_persistence.rb
salesforce_streamer-0.2.1 lib/salesforce_streamer/replay_persistence.rb