Omeka_Job_Dispatcher_Adapter_ZendQueue

Package: Job\Dispatcher\Adapter

class Omeka_Job_Dispatcher_Adapter_ZendQueue

extends Omeka_Job_Dispatcher_Adapter_AbstractAdapter

implements Omeka_Job_Dispatcher_Adapter_AdapterInterface

Dispatcher for Zend_Queue.

This would be particularly useful for installations that want to interface with ActiveMQ or Zend Server’s Job Queue via Zend_Queue. Note that using the ‘Array’ adapter should only be used for testing, as all jobs passed to it will be thrown away.

Required options include ‘adapter’ and ‘options’, which correspond to the first and second arguments to Zend_Queue’s constructor respectively.

For example, it would be configured like so in config.ini: <code> jobs.dispatcher = “Omeka_Job_Dispatcher_ZendQueue” jobs.adapterOptions.adapter = “PlatformJobQueue” jobs.adapterOptions.options.host = “127.0.0.1” jobs.adapterOptions.options.password = “foobar” </code>

Omeka_Job_Dispatcher_Adapter_ZendQueue::setQueueName($name)

Note that some Zend_Queue implementations understand the concept of named queues, while others do not.

Parameters:
  • $name

Omeka_Job_Dispatcher_Adapter_ZendQueue::send($encodedJob, $metadata)
Parameters:
  • $encodedJob

  • $metadata

Omeka_Job_Dispatcher_Adapter_ZendQueue::_queue()
Omeka_Job_Dispatcher_Adapter_ZendQueue::__construct($options = null)
Parameters:
  • $options (array|null) – Optional Options to instantiate in the adapter.

Omeka_Job_Dispatcher_Adapter_ZendQueue::_setOptions($options)
Parameters:
  • $options

Omeka_Job_Dispatcher_Adapter_ZendQueue::getOption($name)

Retrieve an option by name as it was passed to the constructor of the adapter.

Parameters:
  • $name (string) –

Omeka_Job_Dispatcher_Adapter_ZendQueue::hasOption($name)

Whether or not the given option has been set.

Parameters:
  • $name (string) –