class UnifiedQueues::Single::Driver::EventedQueueDriver

EventedQueue queue driver. Uses the EventedQueue class from the evented-queue gem. Priority is supported depending to arguments.

Public Instance Methods

clear!(&block) click to toggle source

Clears the queue.

# File lib/unified-queues/single/driver/evented-queue.rb, line 69
def clear!(&block)
    @native.clear(&block)
end
empty?(&block) click to toggle source

Indicates queue is empty. @param [Boolean] true if it's, false otherwise

# File lib/unified-queues/single/driver/evented-queue.rb, line 61
def empty?(&block)
    @native.empty?(&block)
end
length(&block) click to toggle source

Returns length of the queue. @return [Integer]

# File lib/unified-queues/single/driver/evented-queue.rb, line 78
def length(&block)
    @native.length(&block)
end
pop(blocking = false, &block) click to toggle source

Pops value out of the queue.

@param [Boolean|Integer] blocking true or timeout if it should block, false otherwise @param [Object] queue value

# 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) click to toggle source

Pushes the value into the queue. Priority is supported depending to arguments.

@param [Object] value value for push @param [Object] key key for priority queues

# File lib/unified-queues/single/driver/evented-queue.rb, line 41
def push(value, key = value, &block)
    @native.push(value, key, &block)
end
type() click to toggle source

Returs type of the queue. @return [:linear]

# File lib/unified-queues/single/driver/evented-queue.rb, line 87
def type
    :linear
end