class Redis_Queue in Redis 7.2
Same name and namespace in other branches
- 7.3 lib/Redis/Queue.php \Redis_Queue
Hierarchy
- class \Redis_Queue implements DrupalReliableQueueInterface
Expanded class hierarchy of Redis_Queue
File
- lib/
Redis/ Queue.php, line 3
View source
class Redis_Queue implements DrupalReliableQueueInterface {
/**
* @var DrupalQueueInterface
*/
protected $backend;
/**
* Default contructor
*
* Beware that DrupalQueueInterface does not defines the __construct
* method in the interface yet is being used from DrupalQueue::get()
*
* @param unknown $name
*/
public function __construct($name) {
$className = Redis_Client::getClass(Redis_Client::REDIS_IMPL_QUEUE);
$this->backend = new $className($name);
}
public function createItem($data) {
return $this->backend
->createItem($data);
}
public function numberOfItems() {
return $this->backend
->numberOfItems();
}
public function claimItem($lease_time = 3600) {
return $this->backend
->claimItem($lease_time);
}
public function deleteItem($item) {
return $this->backend
->deleteItem($item);
}
public function releaseItem($item) {
return $this->backend
->releaseItem($item);
}
public function createQueue() {
return $this->backend
->createQueue();
}
public function deleteQueue() {
return $this->backend
->deleteQueue();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Redis_Queue:: |
protected | property | ||
Redis_Queue:: |
public | function |
Claim an item in the queue for processing. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Add a queue item and store it directly to the queue. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Create a queue. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Delete a finished item from the queue. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Delete a queue and every item in the queue. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Retrieve the number of items in the queue. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function |
Release an item that the worker could not process, so another
worker can come in and process it before the timeout expires. Overrides DrupalQueueInterface:: |
|
Redis_Queue:: |
public | function | Default contructor |