interface PushQueueInterface in Salesforce Suite 8.3
Same name and namespace in other branches
- 8.4 modules/salesforce_push/src/PushQueueInterface.php \Drupal\salesforce_push\PushQueueInterface
- 5.0.x modules/salesforce_push/src/PushQueueInterface.php \Drupal\salesforce_push\PushQueueInterface
Push queue interface.
Hierarchy
- interface \Drupal\Core\Queue\QueueInterface- interface \Drupal\Core\Queue\ReliableQueueInterface- interface \Drupal\salesforce_push\PushQueueInterface
 
 
- interface \Drupal\Core\Queue\ReliableQueueInterface
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_pushView 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
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| PushQueueInterface:: | public | function | Inherited classes MUST throw an exception when this method is called. Overrides QueueInterface:: | |
| PushQueueInterface:: | public | function | Claim up to $n items from the current queue. | 1 | 
| PushQueueInterface:: | public | function | Failed item handler. | 1 | 
| QueueInterface:: | public | function | Adds a queue item and store it directly to the queue. | 2 | 
| QueueInterface:: | public | function | Creates a queue. | 2 | 
| QueueInterface:: | public | function | Deletes a finished item from the queue. | 2 | 
| QueueInterface:: | public | function | Deletes a queue and every item in the queue. | 2 | 
| QueueInterface:: | public | function | Retrieves the number of items in the queue. | 2 | 
| QueueInterface:: | public | function | Releases an item that the worker could not process. | 2 | 
