Elgg
Version 3.0
|
FIFO queue that uses the database for persistence. More...
Public Member Functions | ||||
__construct ($name,\Elgg\Database $db) | ||||
Create a queue. More... | ||||
enqueue ($item) | ||||
{Add an item to the queue.
| ||||
dequeue () | ||||
{Remove an item from the queue.
| ||||
clear () | ||||
{Clear all items from the queue.
| ||||
size () | ||||
{Get the size of the queue.
| ||||
Protected Attributes | |
$name | |
$db | |
$workerId | |
FIFO queue that uses the database for persistence.
WARNING: API IN FLUX. DO NOT USE DIRECTLY.
Definition at line 16 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::__construct | ( | $name, | |
\Elgg\Database | $db | ||
) |
Create a queue.
string | $name | Name of the queue. Must be less than 256 characters. |
\Elgg\Database | $db | Database adapter |
Definition at line 33 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::clear | ( | ) |
{Clear all items from the queue.
Implements Elgg\Queue\Queue.
Definition at line 106 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::dequeue | ( | ) |
{Remove an item from the queue.
Implements Elgg\Queue\Queue.
Definition at line 60 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::enqueue | ( | $item | ) |
{Add an item to the queue.
mixed | $item | Item to add to queue |
Implements Elgg\Queue\Queue.
Definition at line 42 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::size | ( | ) |
{Get the size of the queue.
Implements Elgg\Queue\Queue.
Definition at line 121 of file DatabaseQueue.php.
|
protected |
Definition at line 22 of file DatabaseQueue.php.
|
protected |
Definition at line 19 of file DatabaseQueue.php.
|
protected |
Definition at line 25 of file DatabaseQueue.php.