X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FQueue%2FQueue.php;h=c60897b0c94f89d1fdb2c614ae2b093b79680654;hb=1e94e997c66872d420b31d5adc2226db82f448b9;hp=dc40190114383c9ce818b1bd74296e838e3797dc;hpb=d5f6077993b1df66a934933af0bc9327cff13e78;p=civicrm-core.git diff --git a/CRM/Queue/Queue.php b/CRM/Queue/Queue.php index dc40190114..c60897b0c9 100644 --- a/CRM/Queue/Queue.php +++ b/CRM/Queue/Queue.php @@ -1,7 +1,7 @@ _name = $queueSpec['name']; } /** - * Determine the string name of this queue + * Determine the string name of this queue. * * @return string */ - function getName() { + public function getName() { return $this->_name; } /** * Perform any registation or resource-allocation for a new queue */ - abstract function createQueue(); + public abstract function createQueue(); /** * Perform any loading or pre-fetch for an existing queue. */ - abstract function loadQueue(); + public abstract function loadQueue(); /** * Release any resources claimed by the queue (memory, DB rows, etc) */ - abstract function deleteQueue(); + public abstract function deleteQueue(); /** - * Check if the queue exists + * Check if the queue exists. * * @return bool */ - abstract function existsQueue(); + public abstract function existsQueue(); /** - * Add a new item to the queue + * Add a new item to the queue. * - * @param $data serializable PHP object or array - * @param array|\queue $options queue-dependent options; for example, if this is a - * priority-queue, then $options might specify the item's priority - * - * @return bool, TRUE on success + * @param mixed $data + * Serializable PHP object or array. + * @param array $options + * Queue-dependent options; for example, if this is a + * priority-queue, then $options might specify the item's priority. */ - abstract function createItem($data, $options = array()); + public abstract function createItem($data, $options = array()); /** - * Determine number of items remaining in the queue + * Determine number of items remaining in the queue. * * @return int */ - abstract function numberOfItems(); + public abstract function numberOfItems(); /** - * Get the next item + * Get the next item. * - * @param int|\seconds $lease_time seconds + * @param int $lease_time + * Seconds. * - * @return object with key 'data' that matches the inputted data + * @return object + * with key 'data' that matches the inputted data */ - abstract function claimItem($lease_time = 3600); + public abstract function claimItem($lease_time = 3600); /** * Get the next item, even if there's an active lease * - * @param int|\seconds $lease_time seconds + * @param int $lease_time + * Seconds. * - * @return object with key 'data' that matches the inputted data + * @return object + * with key 'data' that matches the inputted data */ - abstract function stealItem($lease_time = 3600); + public abstract function stealItem($lease_time = 3600); /** - * Remove an item from the queue + * Remove an item from the queue. * - * @param $item The item returned by claimItem + * @param object $item + * The item returned by claimItem. */ - abstract function deleteItem($item); + public abstract function deleteItem($item); /** - * Return an item that could not be processed - * - * @param $item The item returned by claimItem + * Return an item that could not be processed. * - * @return bool + * @param object $item + * The item returned by claimItem. */ - abstract function releaseItem($item); -} + public abstract function releaseItem($item); +}