You are here

interface PushQueueInterface in Salesforce Suite 8.3

Same name and namespace in other branches
  1. 8.4 modules/salesforce_push/src/PushQueueInterface.php \Drupal\salesforce_push\PushQueueInterface
  2. 5.0.x modules/salesforce_push/src/PushQueueInterface.php \Drupal\salesforce_push\PushQueueInterface

Push queue interface.

Hierarchy

Expanded class hierarchy of PushQueueInterface

All classes that implement PushQueueInterface

2 files declare their use of PushQueueInterface
Rest.php in modules/salesforce_push/src/Plugin/SalesforcePushQueueProcessor/Rest.php
SalesforcePushQueueProcessorRestTest.php in modules/salesforce_push/tests/src/Unit/SalesforcePushQueueProcessorRestTest.php

File

modules/salesforce_push/src/PushQueueInterface.php, line 10

Namespace

Drupal\salesforce_push
View source
interface PushQueueInterface extends ReliableQueueInterface {

  /**
   * Claim up to $n items from the current queue.
   *
   * If queue is empty, return an empty array.
   *
   * @param int $n
   *   Number of items to claim.
   * @param int $fail_limit
   *   Do not claim items with this many or more failures.
   * @param int $lease_time
   *   Time, in seconds, for which to hold this claim.
   *
   * @see DatabaseQueue::claimItem
   *
   * @return array
   *   Zero to $n Items indexed by item_id
   */
  public function claimItems($n, $fail_limit = 0, $lease_time = 0);

  /**
   * Inherited classes MUST throw an exception when this method is called.
   *
   * Use claimItems() instead.
   *
   * @param int $lease_time
   *   How long should the item remain claimed until considered released?
   *
   * @throws \Exception
   *   Whenever called.
   */
  public function claimItem($lease_time = NULL);

  /**
   * Failed item handler.
   *
   * Exception handler so that Queue Processors don't have to worry about what
   * happens when a queue item fails.
   *
   * @param \Exception $e
   *   The exception which caused the failure.
   * @param object $item
   *   The failed item.
   */
  public function failItem(\Exception $e, \stdClass $item);

}

Members

Namesort descending Modifiers Type Description Overrides
PushQueueInterface::claimItem public function Inherited classes MUST throw an exception when this method is called. Overrides QueueInterface::claimItem
PushQueueInterface::claimItems public function Claim up to $n items from the current queue. 1
PushQueueInterface::failItem public function Failed item handler. 1
QueueInterface::createItem public function Adds a queue item and store it directly to the queue. 2
QueueInterface::createQueue public function Creates a queue. 2
QueueInterface::deleteItem public function Deletes a finished item from the queue. 2
QueueInterface::deleteQueue public function Deletes a queue and every item in the queue. 2
QueueInterface::numberOfItems public function Retrieves the number of items in the queue. 2
QueueInterface::releaseItem public function Releases an item that the worker could not process. 2