You are here

interface ProcessorInterface in Advanced Queue 8

Provides the interface for queue processors.

Hierarchy

Expanded class hierarchy of ProcessorInterface

All classes that implement ProcessorInterface

2 files declare their use of ProcessorInterface
AdvancedQueueCommands.php in src/Commands/AdvancedQueueCommands.php
QueueProcessCommand.php in src/Command/QueueProcessCommand.php

File

src/ProcessorInterface.php, line 10

Namespace

Drupal\advancedqueue
View source
interface ProcessorInterface {

  /**
   * Processes the given queue.
   *
   * Jobs will be claimed and processed one by one until the configured
   * processing time ($queue->getProcessingTime()) passes.
   *
   * @param \Drupal\advancedqueue\Entity\QueueInterface $queue
   *   The queue.
   *
   * @return int
   *   The number of processed jobs.
   */
  public function processQueue(QueueInterface $queue);

  /**
   * Processes the given job.
   *
   * @param \Drupal\advancedqueue\Job $job
   *   The job.
   * @param \Drupal\advancedqueue\Entity\QueueInterface $queue
   *   The parent queue.
   *
   * @return \Drupal\advancedqueue\JobResult
   *   The job result.
   */
  public function processJob(Job $job, QueueInterface $queue);

}

Members

Namesort descending Modifiers Type Description Overrides
ProcessorInterface::processJob public function Processes the given job. 1
ProcessorInterface::processQueue public function Processes the given queue. 1