Elgg
Version master
|
FIFO queue that uses the database for persistence. More...
Public Member Functions | ||||
__construct (string $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.
| ||||
Public Attributes | |
const | TABLE_NAME = 'queue' |
Protected Attributes | |
$name | |
$db | |
$workerId | |
FIFO queue that uses the database for persistence.
Definition at line 17 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::__construct | ( | string | $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 47 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::clear | ( | ) |
{Clear all items from the queue.
Implements Elgg\Queue\Queue.
Definition at line 107 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::dequeue | ( | ) |
{Remove an item from the queue.
Implements Elgg\Queue\Queue.
Definition at line 70 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 56 of file DatabaseQueue.php.
Elgg\Queue\DatabaseQueue::size | ( | ) |
{Get the size of the queue.
Implements Elgg\Queue\Queue.
Definition at line 117 of file DatabaseQueue.php.
|
protected |
Definition at line 34 of file DatabaseQueue.php.
|
protected |
Definition at line 29 of file DatabaseQueue.php.
|
protected |
Definition at line 39 of file DatabaseQueue.php.
const Elgg\Queue\DatabaseQueue::TABLE_NAME = 'queue' |
Definition at line 24 of file DatabaseQueue.php.