CRM_Queue_Queue_Sql
class CRM_Queue_Queue_Sql extends CRM_Queue_Queue
A queue implementation which stores items in the CiviCRM SQL database
Methods
Create a reference to queue. After constructing the queue, one should usually call createQueue (if it's a new queue) or loadQueue (if it's known to be an existing queue).
Perform any registation or resource-allocation for a new queue
Perform any loading or pre-fetch for an existing queue.
Release any resources claimed by the queue (memory, DB rows, etc)
Check if the queue exists.
Add a new item to the queue.
Determine number of items remaining in the queue.
Get the next item.
Get the next item, even if there's an active lease
Details
at line 47
__construct(array $queueSpec)
Create a reference to queue. After constructing the queue, one should usually call createQueue (if it's a new queue) or loadQueue (if it's known to be an existing queue).
in CRM_Queue_Queue at line 67
string
getName()
Determine the string name of this queue.
at line 54
createQueue()
Perform any registation or resource-allocation for a new queue
at line 61
loadQueue()
Perform any loading or pre-fetch for an existing queue.
at line 68
deleteQueue()
Release any resources claimed by the queue (memory, DB rows, etc)
at line 82
bool
existsQueue()
Check if the queue exists.
at line 95
createItem(mixed $data, array $options = [])
Add a new item to the queue.
at line 109
int
numberOfItems()
Determine number of items remaining in the queue.
at line 128
object
claimItem(int $lease_time = 3600)
Get the next item.
at line 181
object
stealItem(int $lease_time = 3600)
Get the next item, even if there's an active lease
at line 210
deleteItem(CRM_Core_DAO $dao)
Remove an item from the queue.
at line 220
releaseItem(CRM_Core_DAO $dao)
Return an item that could not be processed.