Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. QueueInterface.php

function QueueInterface::numberOfItems

Retrieves the number of items in the queue.

This is intended to provide a "best guess" count of the number of items in the queue. Depending on the implementation and the setup, the accuracy of the results of this function may vary.

e.g. On a busy system with a large number of consumers and items, the result might only be valid for a fraction of a second and not provide an accurate representation.

Return value

int An integer estimate of the number of items in the queue.

2 methods override QueueInterface::numberOfItems()
DatabaseQueue::numberOfItems in core/lib/Drupal/Core/Queue/DatabaseQueue.php
Retrieves the number of items in the queue.
Memory::numberOfItems in core/lib/Drupal/Core/Queue/Memory.php
Retrieves the number of items in the queue.

File

core/lib/Drupal/Core/Queue/QueueInterface.php, line 43

Class

QueueInterface
Interface for a queue.

Namespace

Drupal\Core\Queue

Code

public function numberOfItems();

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal