[ Index ] |
PHP Cross Reference of MediaWiki-1.24.0 |
[Source view] [Print] [Project Stats]
Database-backed job queue code. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Author: | Aaron Schulz |
File Size: | 849 lines (25 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
JobQueueDB:: (32 methods):
__construct()
supportedOrders()
optimalOrder()
doIsEmpty()
doGetSize()
doGetAcquiredCount()
doGetAbandonedCount()
doBatchPush()
doBatchPushInternal()
doPop()
claimRandom()
claimOldest()
doAck()
doDeduplicateRootJob()
doDelete()
doWaitForBackups()
doGetPeriodicTasks()
doFlushCaches()
getAllQueuedJobs()
getCoalesceLocationInternal()
doGetSiblingQueuesWithJobs()
doGetSiblingQueueSizes()
recycleAndDeleteStaleJobs()
insertFields()
getSlaveDB()
getMasterDB()
getDB()
getCacheKey()
makeBlob()
extractBlob()
throwDBException()
selectFields()
Class: JobQueueDB - X-Ref
Class to handle job queues stored in the DB__construct( array $params ) X-Ref |
Additional parameters include: - cluster : The name of an external cluster registered via LBFactory. If not specified, the primary DB cluster for the wiki will be used. This can be overridden with a custom cluster so that DB handles will be retrieved via LBFactory::getExternalLB() and getConnection(). param: array $params |
supportedOrders() X-Ref |
No description |
optimalOrder() X-Ref |
No description |
doIsEmpty() X-Ref |
return: bool |
doGetSize() X-Ref |
return: int |
doGetAcquiredCount() X-Ref |
return: int |
doGetAbandonedCount() X-Ref |
return: int |
doBatchPush( array $jobs, $flags ) X-Ref |
param: array $jobs param: int $flags return: void |
doBatchPushInternal( IDatabase $dbw, array $jobs, $flags, $method ) X-Ref |
No description |
doPop() X-Ref |
return: Job|bool |
claimRandom( $uuid, $rand, $gte ) X-Ref |
Reserve a row with a single UPDATE without holding row locks over RTTs... param: string $uuid 32 char hex string param: int $rand Random unsigned integer (31 bits) param: bool $gte Search for job_random >= $random (otherwise job_random <= $random) return: stdClass|bool Row|false |
claimOldest( $uuid ) X-Ref |
Reserve a row with a single UPDATE without holding row locks over RTTs... param: string $uuid 32 char hex string return: stdClass|bool Row|false |
doAck( Job $job ) X-Ref |
param: Job $job return: Job|bool |
doDeduplicateRootJob( Job $job ) X-Ref |
param: Job $job return: bool |
doDelete() X-Ref |
return: bool |
doWaitForBackups() X-Ref |
return: void |
doGetPeriodicTasks() X-Ref |
return: array |
doFlushCaches() X-Ref |
return: void |
getAllQueuedJobs() X-Ref |
return: Iterator |
getCoalesceLocationInternal() X-Ref |
No description |
doGetSiblingQueuesWithJobs( array $types ) X-Ref |
No description |
doGetSiblingQueueSizes( array $types ) X-Ref |
No description |
recycleAndDeleteStaleJobs() X-Ref |
Recycle or destroy any jobs that have been claimed for too long return: int Number of jobs recycled/deleted |
insertFields( IJobSpecification $job ) X-Ref |
No description |
getSlaveDB() X-Ref |
return: DBConnRef |
getMasterDB() X-Ref |
return: DBConnRef |
getDB( $index ) X-Ref |
param: int $index (DB_SLAVE/DB_MASTER) return: DBConnRef |
getCacheKey( $property ) X-Ref |
param: string $property return: string |
makeBlob( $params ) X-Ref |
param: array|bool $params return: string |
extractBlob( $blob ) X-Ref |
param: string $blob return: bool|mixed |
throwDBException( DBError $e ) X-Ref |
param: DBError $e |
selectFields() X-Ref |
Return the list of job fields that should be selected. return: array |
Generated: Fri Nov 28 14:03:12 2014 | Cross-referenced by PHPXref 0.7.1 |