Class: QRPC::Locator::EventedQueueLocator

Inherits:
Object
  • Object
show all
Defined in:
lib/qrpc/locator/evented-queue.rb

Overview

Locator for ‘evented-queue’ queue type.

Defined Under Namespace

Classes: REUQ

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(queue_name, queue = self.default_queue) ⇒ EventedQueueLocator

Constructor.

Parameters:

  • queue (EventedQueue::Recurring) (defaults to: self.default_queue)

    recurring evented queue instance

Since:

  • 0.9.0



52
53
54
55
# File 'lib/qrpc/locator/evented-queue.rb', line 52

def initialize(queue_name, queue = self.default_queue)
    @queue = queue
    @queue_name = queue_name
end

Instance Attribute Details

#queueEventedQueue::Recurring Also known as: input_queue, output_queue

Contains queue instance.

Returns:

  • (EventedQueue::Recurring)

Since:

  • 0.9.0



44
45
46
# File 'lib/qrpc/locator/evented-queue.rb', line 44

def queue
  @queue
end

#queue_nameString

Contains queue name.

Returns:

  • (String)

Since:

  • 0.9.0



36
37
38
# File 'lib/qrpc/locator/evented-queue.rb', line 36

def queue_name
  @queue_name
end

Instance Method Details

#default_queueObject

Returns the default evented queue type.

Since:

  • 0.9.0



61
62
63
# File 'lib/qrpc/locator/evented-queue.rb', line 61

def default_queue 
    UnifiedQueues::Multi::new UnifiedQueues::Single, ::EM::Wrapper::new(REUQ),  UnifiedQueues::Single, CPriorityQueue
end