MediaWiki
REL1_22
|
Class to handle job queues stored in the DB. More...
Public Member Functions | |
doBatchPushInternal (IDatabase $dbw, array $jobs, $flags, $method) | |
This function should *not* be called outside of JobQueueDB. | |
getAllQueuedJobs () | |
getCoalesceLocationInternal () | |
Do not use this function outside of JobQueue/JobQueueGroup. | |
recycleAndDeleteStaleJobs () | |
Recycle or destroy any jobs that have been claimed for too long. | |
Public Attributes | |
const | CACHE_TTL_LONG = 300 |
const | CACHE_TTL_SHORT = 30 |
const | MAX_AGE_PRUNE = 604800 |
const | MAX_JOB_RANDOM = 2147483647 |
const | MAX_OFFSET = 255 |
Protected Member Functions | |
__construct (array $params) | |
Additional parameters include: | |
claimOldest ($uuid) | |
Reserve a row with a single UPDATE without holding row locks over RTTs... | |
claimRandom ($uuid, $rand, $gte) | |
Reserve a row with a single UPDATE without holding row locks over RTTs... | |
doAck (Job $job) | |
doBatchPush (array $jobs, $flags) | |
doDeduplicateRootJob (Job $job) | |
doDelete () | |
doFlushCaches () | |
doGetAbandonedCount () | |
doGetAcquiredCount () | |
doGetPeriodicTasks () | |
doGetSiblingQueueSizes (array $types) | |
doGetSiblingQueuesWithJobs (array $types) | |
doGetSize () | |
doIsEmpty () | |
doPop () | |
doWaitForBackups () | |
getDB ($index) | |
getMasterDB () | |
getSlaveDB () | |
insertFields (Job $job) | |
optimalOrder () | |
Get the default queue order to use if configuration does not specify one. | |
supportedOrders () | |
Get the allowed queue orders for configuration validation. | |
throwDBException (DBError $e) | |
Static Protected Member Functions | |
static | extractBlob ($blob) |
static | makeBlob ($params) |
Protected Attributes | |
BagOStuff | $cache |
* | |
$cluster = false | |
Private Member Functions | |
getCacheKey ($property) |
Class to handle job queues stored in the DB.
Definition at line 30 of file JobQueueDB.php.
JobQueueDB::__construct | ( | array $ | params | ) | [protected] |
Additional parameters include:
$params | array |
Reimplemented from JobQueue.
Definition at line 49 of file JobQueueDB.php.
JobQueueDB::claimOldest | ( | $ | uuid | ) | [protected] |
Reserve a row with a single UPDATE without holding row locks over RTTs...
string | $uuid | 32 char hex string |
Definition at line 416 of file JobQueueDB.php.
JobQueueDB::claimRandom | ( | $ | uuid, |
$ | rand, | ||
$ | gte | ||
) | [protected] |
Reserve a row with a single UPDATE without holding row locks over RTTs...
string | $uuid | 32 char hex string |
$rand | integer Random unsigned integer (31 bits) | |
bool | $gte | Search for job_random >= $random (otherwise job_random <= $random) |
Definition at line 340 of file JobQueueDB.php.
JobQueueDB::doAck | ( | Job $ | job | ) | [protected] |
Job | $job |
MWException |
Reimplemented from JobQueue.
Definition at line 477 of file JobQueueDB.php.
JobQueueDB::doBatchPush | ( | array $ | jobs, |
$ | flags | ||
) | [protected] |
array | $jobs | |
$flags |
DBError|Exception |
Reimplemented from JobQueue.
Definition at line 194 of file JobQueueDB.php.
JobQueueDB::doBatchPushInternal | ( | IDatabase $ | dbw, |
array $ | jobs, | ||
$ | flags, | ||
$ | method | ||
) |
This function should *not* be called outside of JobQueueDB.
DatabaseBase | $dbw | |
array | $jobs | |
int | $flags | |
string | $method |
type |
Definition at line 218 of file JobQueueDB.php.
JobQueueDB::doDeduplicateRootJob | ( | Job $ | job | ) | [protected] |
Job | $job |
MWException |
Reimplemented from JobQueue.
Definition at line 507 of file JobQueueDB.php.
JobQueueDB::doDelete | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 539 of file JobQueueDB.php.
JobQueueDB::doFlushCaches | ( | ) | [protected] |
JobQueueDB::doGetAbandonedCount | ( | ) | [protected] |
MWException |
Reimplemented from JobQueue.
Definition at line 155 of file JobQueueDB.php.
JobQueueDB::doGetAcquiredCount | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 124 of file JobQueueDB.php.
JobQueueDB::doGetPeriodicTasks | ( | ) | [protected] |
JobQueueDB::doGetSiblingQueueSizes | ( | array $ | types | ) | [protected] |
array | $types | List of queues types |
Reimplemented from JobQueue.
Definition at line 623 of file JobQueueDB.php.
References $dbr, $res, array(), as, and getSlaveDB().
JobQueueDB::doGetSiblingQueuesWithJobs | ( | array $ | types | ) | [protected] |
array | $types | List of queues types |
Reimplemented from JobQueue.
Definition at line 611 of file JobQueueDB.php.
References $dbr, $res, array(), as, and getSlaveDB().
JobQueueDB::doGetSize | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 98 of file JobQueueDB.php.
JobQueueDB::doIsEmpty | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 71 of file JobQueueDB.php.
JobQueueDB::doPop | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 281 of file JobQueueDB.php.
JobQueueDB::doWaitForBackups | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 553 of file JobQueueDB.php.
static JobQueueDB::extractBlob | ( | $ | blob | ) | [static, protected] |
Reimplemented from JobQueue.
Definition at line 582 of file JobQueueDB.php.
JobQueueDB::getCacheKey | ( | $ | property | ) | [private] |
Definition at line 778 of file JobQueueDB.php.
Do not use this function outside of JobQueue/JobQueueGroup.
Reimplemented from JobQueue.
Definition at line 605 of file JobQueueDB.php.
JobQueueDB::getDB | ( | $ | index | ) | [protected] |
$index | integer (DB_SLAVE/DB_MASTER) |
Definition at line 768 of file JobQueueDB.php.
JobQueueDB::getMasterDB | ( | ) | [protected] |
Definition at line 756 of file JobQueueDB.php.
JobQueueDB::getSlaveDB | ( | ) | [protected] |
Definition at line 745 of file JobQueueDB.php.
Referenced by doGetSiblingQueueSizes(), and doGetSiblingQueuesWithJobs().
JobQueueDB::insertFields | ( | Job $ | job | ) | [protected] |
static JobQueueDB::makeBlob | ( | $ | params | ) | [static, protected] |
JobQueueDB::optimalOrder | ( | ) | [protected] |
Get the default queue order to use if configuration does not specify one.
Reimplemented from JobQueue.
Definition at line 63 of file JobQueueDB.php.
Recycle or destroy any jobs that have been claimed for too long.
Definition at line 640 of file JobQueueDB.php.
JobQueueDB::supportedOrders | ( | ) | [protected] |
Get the allowed queue orders for configuration validation.
Reimplemented from JobQueue.
Definition at line 59 of file JobQueueDB.php.
References array().
JobQueueDB::throwDBException | ( | DBError $ | e | ) | [protected] |
*
Definition at line 37 of file JobQueueDB.php.
JobQueueDB::$cluster = false [protected] |
Definition at line 39 of file JobQueueDB.php.
const JobQueueDB::CACHE_TTL_LONG = 300 |
Definition at line 32 of file JobQueueDB.php.
const JobQueueDB::CACHE_TTL_SHORT = 30 |
Definition at line 31 of file JobQueueDB.php.
const JobQueueDB::MAX_AGE_PRUNE = 604800 |
Definition at line 33 of file JobQueueDB.php.
const JobQueueDB::MAX_JOB_RANDOM = 2147483647 |
Definition at line 34 of file JobQueueDB.php.
const JobQueueDB::MAX_OFFSET = 255 |
Definition at line 35 of file JobQueueDB.php.