You are here

public function QueueMongodb::numberOfItems in MongoDB 8

Retrieve the number of items in the queue.

Return value

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

Overrides QueueInterface::numberOfItems

File

src/QueueMongodb.php, line 69
Contains \Drupal\mongodb\QueueMongodb

Class

QueueMongodb
MongoDB queue implementation.

Namespace

Drupal\mongodb

Code

public function numberOfItems() {
  return $this
    ->mongoCollection()
    ->count();
}