Class: Shoryuken::WorkerRegistry

Inherits:
Object
  • Object
show all
Defined in:
lib/shoryuken/worker_registry.rb

Direct Known Subclasses

DefaultWorkerRegistry

Instance Method Summary collapse

Instance Method Details

#batch_receive_messages?(queue) ⇒ Boolean


3
4
5
6
# File 'lib/shoryuken/worker_registry.rb', line 3

def batch_receive_messages?(queue)
  # true if the workers for queue support batch processing of messages
  fail NotImplementedError
end

#clearObject


8
9
10
11
# File 'lib/shoryuken/worker_registry.rb', line 8

def clear
  # must remove all worker registrations
  fail NotImplementedError
end

#fetch_worker(queue, message) ⇒ Object


13
14
15
16
17
# File 'lib/shoryuken/worker_registry.rb', line 13

def fetch_worker(queue, message)
  # must return an instance of the worker that handles
  # message received on queue
  fail NotImplementedError
end

#queuesObject


19
20
21
22
# File 'lib/shoryuken/worker_registry.rb', line 19

def queues
  # must return a list of all queues with registered workers
  fail NotImplementedError
end

#register_worker(queue, clazz) ⇒ Object


24
25
26
27
# File 'lib/shoryuken/worker_registry.rb', line 24

def register_worker(queue, clazz)
  # must register the worker as a consumer of messages from queue
  fail NotImplementedError
end

#workers(queue) ⇒ Object


29
30
31
32
# File 'lib/shoryuken/worker_registry.rb', line 29

def workers(queue)
  # must return the list of workers registered for queue, or []
  fail NotImplementedError
end