interface DelayableQueueInterface in Drupal 10
Same name and namespace in other branches
- 9 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
- interface \Drupal\Core\Queue\DelayableQueueInterface extends \Drupal\Core\Queue\QueueInterface
 
Expanded class hierarchy of DelayableQueueInterface
All classes that implement DelayableQueueInterface
Related topics
File
- core/
lib/ Drupal/ Core/ Queue/ DelayableQueueInterface.php, line 12  
Namespace
Drupal\Core\QueueView 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);
}