Sha256: f116a220fc15764fc5885c8f35a1400afee73ea45b472b07a4fc61352d291dad

Contents?: true

Size: 499 Bytes

Versions: 64

Compression:

Stored size: 499 Bytes

Contents

# This is a simple implementation of an in memory queue using an array.
module DispatchRider
  module QueueServices
    class Simple < Base
      def assign_storage(attrs)
        []
      end

      def insert(item)
        queue << item
      end

      def raw_head
        queue.first
      end

      def construct_message_from(item)
        deserialize(item)
      end

      def delete(item)
        queue.delete(item)
      end

      def size
        queue.size
      end
    end
  end
end

Version data entries

64 entries across 64 versions & 1 rubygems

Version Path
dispatch-rider-2.1.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-2.0.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.9.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.6 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.5 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.4 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.3 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.2 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.1 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.8.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.7.2 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.7.1 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.7.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.6.2 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.6.1 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.6.0 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.5.3 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.5.2 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.5.1 lib/dispatch-rider/queue_services/simple.rb
dispatch-rider-1.5.0 lib/dispatch-rider/queue_services/simple.rb