Class: UnifiedQueues::Single::Driver::EventedQueueDriver
- Inherits:
-
UnifiedQueues::Single::Driver
- Object
- UnifiedQueues::Single::Driver
- UnifiedQueues::Single::Driver::EventedQueueDriver
- Defined in:
- lib/unified-queues/single/driver/evented-queue.rb
Overview
EventedQueue queue driver. Uses the EventedQueue
class from the evented-queue
gem. Priority is supported depending to arguments.
Instance Attribute Summary
Attributes inherited from UnifiedQueues::Single::Driver
Instance Method Summary collapse
-
#clear!(&block) ⇒ Object
Clears the queue.
-
#empty?(&block) ⇒ Boolean
Indicates queue is empty.
-
#length(&block) ⇒ Integer
Returns length of the queue.
-
#pop(blocking = false, &block) ⇒ Object
Pops value out of the queue.
-
#push(value, key = value, &block) ⇒ Object
Pushes the value into the queue.
-
#type ⇒ :linear
Returs type of the queue.
Methods inherited from UnifiedQueues::Single::Driver
#evented?, #initialize, #linear?
Constructor Details
This class inherits a constructor from UnifiedQueues::Single::Driver
Instance Method Details
#clear!(&block) ⇒ Object
Clears the queue.
69 70 71 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 69 def clear!(&block) @native.clear(&block) end |
#empty?(&block) ⇒ Boolean
Indicates queue is empty.
61 62 63 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 61 def empty?(&block) @native.empty?(&block) end |
#length(&block) ⇒ Integer
Returns length of the queue.
78 79 80 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 78 def length(&block) @native.length(&block) end |
#pop(blocking = false, &block) ⇒ Object
Pops value out of the queue.
52 53 54 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 52 def pop(blocking = false, &block) @native.pop(&block) end |
#push(value, key = value, &block) ⇒ Object
Pushes the value into the queue. Priority is supported depending to arguments.
41 42 43 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 41 def push(value, key = value, &block) @native.push(value, key, &block) end |
#type ⇒ :linear
Returs type of the queue.
87 88 89 |
# File 'lib/unified-queues/single/driver/evented-queue.rb', line 87 def type :linear end |