class UnifiedQueues::Multi::Driver

Abstract multi driver class. @abstract

Abstract multi driver class. @abstract

Abstract multi driver class. @abstract

Attributes

native[RW]

Holds native object. @return [Object]

Public Class Methods

new(cls, *args, &block) click to toggle source

Constructor.

# File lib/unified-queues/multi/driver.rb, line 38
def initialize(cls, *args, &block)
    if self.instance_of? UniversalQueues::Multi::Driver
        not_implemented
    end
    
    if cls.kind_of? Class
        @native = cls::new(*args, &block)
    else
        @native = cls
    end
end

Public Instance Methods

close() { || ... } click to toggle source

Closes the session.

# File lib/unified-queues/multi/driver.rb, line 168
def close(&block)
    yield if not block.nil?
end
Also aliased as: close!
close!(&block)
Alias for: close
list(&block) click to toggle source

Lists names of all available queues.

@return [Array] @abstract

# File lib/unified-queues/multi/driver.rb, line 138
def list(&block)
    not_implemented
end
list_subscribed(&block) click to toggle source

Lists all subscribed queues.

@return [Array] @abstract

# File lib/unified-queues/multi/driver.rb, line 160
def list_subscribed(&block)
    not_implemented
end
list_used(&block) click to toggle source

Lists all used queues.

@return [Array] @abstract

# File lib/unified-queues/multi/driver.rb, line 149
def list_used(&block)
    not_implemented
end
pop(blocking = false, &block) click to toggle source

Pops value from the queue. In contrast to default Queue library, blocks or returns nil if empty.

@param [Boolean|Integer] blocking true or timeout if it should block, false otherwise @return [Object|nil] @abstract

# File lib/unified-queues/multi/driver.rb, line 70
def pop(blocking = false, &block)
    not_implemented
end
push(value, &block) click to toggle source

Pushes value to the currently used queue.

@param [Object] value @abstract

# File lib/unified-queues/multi/driver.rb, line 57
def push(value, &block)
    not_implemented
end
subscribe(name, &block) click to toggle source

Subscribes to the queue. So marks it as target for {#pop}. Note, than only single queue can be subscribed at one time.

@param [Object] name name of the required queue @abstract

# File lib/unified-queues/multi/driver.rb, line 94
def subscribe(name, &block)
    not_implemented
end
subscribed(&block) click to toggle source

Currently subscribed queue.

@return [UniversalQueues::Single] @abstract

# File lib/unified-queues/multi/driver.rb, line 127
def subscribed(&block)
    not_implemented
end
unsubscribe(name, &block) click to toggle source

Unsubscribes from the queue.

@param [Object] name name of the required queue\ @abstract

# File lib/unified-queues/multi/driver.rb, line 105
def unsubscribe(name, &block)
    not_implemented
end
use(name, &block) click to toggle source

Sets queue with given name as used. So marks it as target for {#push}.

@param [Object] name name of the required queue @abstract

# File lib/unified-queues/multi/driver.rb, line 82
def use(name, &block)
    not_implemented
end
used(&block) click to toggle source

Currently used queue.

@return [Queue] @abstract

# File lib/unified-queues/multi/driver.rb, line 116
def used(&block)
    not_implemented
end