MediaWiki REL1_31
|
Class to handle job queues stored in PHP memory for testing. More...
Public Member Functions | |
getAllAcquiredJobs () | |
getAllQueuedJobs () | |
jobFromSpecInternal (IJobSpecification $spec) | |
Public Member Functions inherited from JobQueue | |
ack (Job $job) | |
Acknowledge that a job was completed. | |
batchPush (array $jobs, $flags=0) | |
Push a batch of jobs into the queue. | |
deduplicateRootJob (IJobSpecification $job) | |
Register the "root job" of a given job into the queue for de-duplication. | |
delayedJobsEnabled () | |
delete () | |
Deleted all unclaimed and delayed jobs from the queue. | |
flushCaches () | |
Clear any process and persistent caches. | |
getAbandonedCount () | |
Get the number of acquired jobs that can no longer be attempted. | |
getAcquiredCount () | |
Get the number of acquired jobs (these are temporarily out of the queue). | |
getAllAbandonedJobs () | |
Get an iterator to traverse over all abandoned jobs in this queue. | |
getAllDelayedJobs () | |
Get an iterator to traverse over all delayed jobs in this queue. | |
getCoalesceLocationInternal () | |
Do not use this function outside of JobQueue/JobQueueGroup. | |
getDelayedCount () | |
Get the number of delayed jobs (these are temporarily out of the queue). | |
getOrder () | |
getReadOnlyReason () | |
getSiblingQueueSizes (array $types) | |
Check the size of each of the given queues. | |
getSiblingQueuesWithJobs (array $types) | |
Check whether each of the given queues are empty. | |
getSize () | |
Get the number of available (unacquired, non-delayed) jobs in the queue. | |
getType () | |
getWiki () | |
isEmpty () | |
Quickly check if the queue has no available (unacquired, non-delayed) jobs. | |
pop () | |
Pop a job off of the queue. | |
push ( $jobs, $flags=0) | |
Push one or more jobs into the queue. | |
waitForBackups () | |
Wait for any replica DBs or backup servers to catch up. | |
Protected Member Functions | |
doAck (Job $job) | |
doBatchPush (array $jobs, $flags) | |
doDelete () | |
doGetAcquiredCount () | |
doGetSize () | |
doIsEmpty () | |
doPop () | |
optimalOrder () | |
supportedOrders () | |
Protected Member Functions inherited from JobQueue | |
__construct (array $params) | |
assertNotReadOnly () | |
doDeduplicateRootJob (IJobSpecification $job) | |
doFlushCaches () | |
doGetAbandonedCount () | |
doGetDelayedCount () | |
doGetSiblingQueueSizes (array $types) | |
doGetSiblingQueuesWithJobs (array $types) | |
doIsRootJobOldDuplicate (Job $job) | |
doWaitForBackups () | |
getRootJobCacheKey ( $signature) | |
isRootJobOldDuplicate (Job $job) | |
Check if the "root" job of a given job has been superseded by a newer one. | |
supportsDelayedJobs () | |
Find out if delayed jobs are supported for configuration validation. | |
Static Protected Attributes | |
static array[] | $data = [] |
Private Member Functions | |
& | getQueueData ( $field, $init=null) |
Additional Inherited Members | |
Static Public Member Functions inherited from JobQueue | |
static | factory (array $params) |
Get a job queue object of the specified type. | |
static | incrStats ( $key, $type, $delta=1) |
Call wfIncrStats() for the queue overall and for the queue type. | |
Public Attributes inherited from JobQueue | |
const | QOS_ATOMIC = 1 |
const | ROOTJOB_TTL = 2419200 |
Protected Attributes inherited from JobQueue | |
JobQueueAggregator | $aggr |
int | $claimTTL |
Time to live in seconds. | |
BagOStuff | $dupCache |
int | $maxTries |
Maximum number of times to try a job. | |
string | $order |
Job priority for pop() | |
string bool | $readOnlyReason |
Read only rationale (or false if r/w) | |
string | $type |
Job type. | |
string | $wiki |
Wiki ID. | |
Class to handle job queues stored in PHP memory for testing.
JobQueueGroup does not remember every queue instance, so statically track it here
Definition at line 31 of file JobQueueMemory.php.
|
protected |
Job | $job |
Reimplemented from JobQueue.
Definition at line 145 of file JobQueueMemory.php.
References $job, JobQueue\getAcquiredCount(), and getQueueData().
|
protected |
IJobSpecification[] | $jobs | |
int | $flags |
Reimplemented from JobQueue.
Definition at line 41 of file JobQueueMemory.php.
References $job, getQueueData(), and serialize().
|
protected |
Reimplemented from JobQueue.
Definition at line 157 of file JobQueueMemory.php.
References type.
|
protected |
Reimplemented from JobQueue.
Definition at line 102 of file JobQueueMemory.php.
References getQueueData().
|
protected |
Reimplemented from JobQueue.
Definition at line 91 of file JobQueueMemory.php.
References getQueueData().
Referenced by doIsEmpty(), and doPop().
|
protected |
Reimplemented from JobQueue.
Definition at line 82 of file JobQueueMemory.php.
References doGetSize().
|
protected |
Reimplemented from JobQueue.
Definition at line 113 of file JobQueueMemory.php.
References $job, doGetSize(), getQueueData(), jobFromSpecInternal(), key, and order.
JobQueueMemory::getAllAcquiredJobs | ( | ) |
Reimplemented from JobQueue.
Definition at line 190 of file JobQueueMemory.php.
References $value, getQueueData(), and jobFromSpecInternal().
JobQueueMemory::getAllQueuedJobs | ( | ) |
Reimplemented from JobQueue.
Definition at line 171 of file JobQueueMemory.php.
References $value, getQueueData(), and jobFromSpecInternal().
|
private |
string | $field | |
mixed | $init |
Definition at line 219 of file JobQueueMemory.php.
References JobQueue\$type, JobQueue\$wiki, and type.
Referenced by doAck(), doBatchPush(), doGetAcquiredCount(), doGetSize(), doPop(), getAllAcquiredJobs(), and getAllQueuedJobs().
JobQueueMemory::jobFromSpecInternal | ( | IJobSpecification | $spec | ) |
IJobSpecification | $spec |
Definition at line 209 of file JobQueueMemory.php.
References Job\factory().
Referenced by doPop(), getAllAcquiredJobs(), and getAllQueuedJobs().
|
protected |
Reimplemented from JobQueue.
Definition at line 73 of file JobQueueMemory.php.
|
protected |
Reimplemented from JobQueue.
Definition at line 64 of file JobQueueMemory.php.
|
staticprotected |
Definition at line 33 of file JobQueueMemory.php.