MediaWiki
REL1_24
|
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. | |
Static Public Member Functions | |
static | selectFields () |
Return the list of job fields that should be selected. | |
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 (IJobSpecification $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 |
* | |
bool string | $cluster = false |
Name of an external DB cluster. | |
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:
array | $params |
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 418 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 |
int | $rand | Random unsigned integer (31 bits) |
bool | $gte | Search for job_random >= $random (otherwise job_random <= $random) |
Definition at line 341 of file JobQueueDB.php.
JobQueueDB::doAck | ( | Job $ | job | ) | [protected] |
Job | $job |
MWException |
Reimplemented from JobQueue.
Definition at line 479 of file JobQueueDB.php.
JobQueueDB::doBatchPush | ( | array $ | jobs, |
$ | flags | ||
) | [protected] |
array | $jobs | |
int | $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.
IDatabase | $dbw | |
array | $jobs | |
int | $flags | |
string | $method |
DBError |
Definition at line 216 of file JobQueueDB.php.
JobQueueDB::doDeduplicateRootJob | ( | Job $ | job | ) | [protected] |
Job | $job |
MWException |
Reimplemented from JobQueue.
Definition at line 509 of file JobQueueDB.php.
JobQueueDB::doDelete | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 541 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 625 of file JobQueueDB.php.
JobQueueDB::doGetSiblingQueuesWithJobs | ( | array $ | types | ) | [protected] |
array | $types | List of queues types |
Reimplemented from JobQueue.
Definition at line 612 of file JobQueueDB.php.
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 283 of file JobQueueDB.php.
JobQueueDB::doWaitForBackups | ( | ) | [protected] |
Reimplemented from JobQueue.
Definition at line 556 of file JobQueueDB.php.
static JobQueueDB::extractBlob | ( | $ | blob | ) | [static, protected] |
Reimplemented from JobQueue.
Definition at line 585 of file JobQueueDB.php.
JobQueueDB::getCacheKey | ( | $ | property | ) | [private] |
Do not use this function outside of JobQueue/JobQueueGroup.
Reimplemented from JobQueue.
Definition at line 606 of file JobQueueDB.php.
JobQueueDB::getDB | ( | $ | index | ) | [protected] |
int | $index | (DB_SLAVE/DB_MASTER) |
Definition at line 776 of file JobQueueDB.php.
JobQueueDB::getMasterDB | ( | ) | [protected] |
JobQueueConnectionError |
Definition at line 764 of file JobQueueDB.php.
JobQueueDB::getSlaveDB | ( | ) | [protected] |
JobQueueConnectionError |
Definition at line 752 of file JobQueueDB.php.
JobQueueDB::insertFields | ( | IJobSpecification $ | 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 643 of file JobQueueDB.php.
static JobQueueDB::selectFields | ( | ) | [static] |
Return the list of job fields that should be selected.
Definition at line 832 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.
JobQueueDB::throwDBException | ( | DBError $ | e | ) | [protected] |
*
Definition at line 37 of file JobQueueDB.php.
bool string JobQueueDB::$cluster = false [protected] |
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.