interface DelayableQueueInterface

Same name in other branches
  1. 10 core/lib/Drupal/Core/Queue/DelayableQueueInterface.php \Drupal\Core\Queue\DelayableQueueInterface
  2. 11.x core/lib/Drupal/Core/Queue/DelayableQueueInterface.php \Drupal\Core\Queue\DelayableQueueInterface

Delayable queue interface.

Classes implementing this interface allow an item to be released on a delay.

Hierarchy

Expanded class hierarchy of DelayableQueueInterface

All classes that implement DelayableQueueInterface

Related topics

1 file declares its use of DelayableQueueInterface
Cron.php in core/lib/Drupal/Core/Cron.php

File

core/lib/Drupal/Core/Queue/DelayableQueueInterface.php, line 12

Namespace

Drupal\Core\Queue
View source
interface DelayableQueueInterface extends QueueInterface {
    
    /**
     * Delay an item so it runs in the future.
     *
     * @param object $item
     *   The item returned by \Drupal\Core\Queue\QueueInterface::claimItem().
     * @param int $delay
     *   A delay before the item's lock should expire (in seconds). Relative to
     *   the current time, not the item's current expiry.
     *
     * @throws \InvalidArgumentException
     *   When a negative $delay is provided; $delay must be non-negative.
     *
     * @see \Drupal\Core\Queue\QueueInterface::releaseItem()
     *   To immediately release an item without delay.
     *
     * @return bool
     *   TRUE if the item has been updated, FALSE otherwise.
     */
    public function delayItem($item, int $delay);

}

Members

Title Sort descending Modifiers Object type Summary Overrides
DelayableQueueInterface::delayItem public function Delay an item so it runs in the future. 1
QueueInterface::claimItem public function Claims an item in the queue for processing. 2
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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.