You are here

public function QueueBase::__construct in Redis 8

Constructs a \Drupal\Core\Queue\DatabaseQueue object.

Parameters

string $name: The name of the queue.

array $settings: Array of Redis-related settings for this queue.

4 calls to QueueBase::__construct()
PhpRedis::__construct in src/Queue/PhpRedis.php
Constructs a \Drupal\redis\Queue\PhpRedis object.
Predis::__construct in src/Queue/Predis.php
Constructs a \Drupal\redis\Queue\Predis object.
ReliablePhpRedis::__construct in src/Queue/ReliablePhpRedis.php
Constructs a \Drupal\redis\Queue\PhpRedis object.
ReliablePredis::__construct in src/Queue/ReliablePredis.php
Constructs a \Drupal\redis\Queue\Predis object.
4 methods override QueueBase::__construct()
PhpRedis::__construct in src/Queue/PhpRedis.php
Constructs a \Drupal\redis\Queue\PhpRedis object.
Predis::__construct in src/Queue/Predis.php
Constructs a \Drupal\redis\Queue\Predis object.
ReliablePhpRedis::__construct in src/Queue/ReliablePhpRedis.php
Constructs a \Drupal\redis\Queue\PhpRedis object.
ReliablePredis::__construct in src/Queue/ReliablePredis.php
Constructs a \Drupal\redis\Queue\Predis object.

File

src/Queue/QueueBase.php, line 79

Class

QueueBase
Redis queue implementation.

Namespace

Drupal\redis\Queue

Code

public function __construct($name, array $settings) {
  $this->name = $name;
  $this->reserveTimeout = $settings['reserve_timeout'];
  $this->availableListKey = static::KEY_PREFIX . $name . ':avail';
  $this->availableItems = static::KEY_PREFIX . $name . ':items';
  $this->claimedListKey = static::KEY_PREFIX . $name . ':claimed';
  $this->leasedKeyPrefix = static::KEY_PREFIX . $name . ':lease:';
  $this->incrementCounterKey = static::KEY_PREFIX . $name . ':counter';
}