MediaWiki
1.28.0
|
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. More... | |
batchPush (array $jobs, $flags=0) | |
Push a batch of jobs into the queue. More... | |
deduplicateRootJob (IJobSpecification $job) | |
Register the "root job" of a given job into the queue for de-duplication. More... | |
delayedJobsEnabled () | |
delete () | |
Deleted all unclaimed and delayed jobs from the queue. More... | |
flushCaches () | |
Clear any process and persistent caches. More... | |
getAbandonedCount () | |
Get the number of acquired jobs that can no longer be attempted. More... | |
getAcquiredCount () | |
Get the number of acquired jobs (these are temporarily out of the queue). More... | |
getAllAbandonedJobs () | |
Get an iterator to traverse over all abandoned jobs in this queue. More... | |
getAllAcquiredJobs () | |
Get an iterator to traverse over all claimed jobs in this queue. More... | |
getAllDelayedJobs () | |
Get an iterator to traverse over all delayed jobs in this queue. More... | |
getAllQueuedJobs () | |
Get an iterator to traverse over all available jobs in this queue. More... | |
getCoalesceLocationInternal () | |
Do not use this function outside of JobQueue/JobQueueGroup. More... | |
getDelayedCount () | |
Get the number of delayed jobs (these are temporarily out of the queue). More... | |
getOrder () | |
getReadOnlyReason () | |
getSiblingQueueSizes (array $types) | |
Check the size of each of the given queues. More... | |
getSiblingQueuesWithJobs (array $types) | |
Check whether each of the given queues are empty. More... | |
getSize () | |
Get the number of available (unacquired, non-delayed) jobs in the queue. More... | |
getType () | |
getWiki () | |
isEmpty () | |
Quickly check if the queue has no available (unacquired, non-delayed) jobs. More... | |
pop () | |
Pop a job off of the queue. More... | |
push ($jobs, $flags=0) | |
Push one or more jobs into the queue. More... | |
waitForBackups () | |
Wait for any replica DBs or backup servers to catch up. More... | |
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 () | |
doAck (Job $job) | |
doBatchPush (array $jobs, $flags) | |
doDeduplicateRootJob (IJobSpecification $job) | |
doDelete () | |
doFlushCaches () | |
doGetAbandonedCount () | |
doGetAcquiredCount () | |
doGetDelayedCount () | |
doGetSiblingQueueSizes (array $types) | |
doGetSiblingQueuesWithJobs (array $types) | |
doGetSize () | |
doIsEmpty () | |
doIsRootJobOldDuplicate (Job $job) | |
doPop () | |
doWaitForBackups () | |
getRootJobCacheKey ($signature) | |
isRootJobOldDuplicate (Job $job) | |
Check if the "root" job of a given job has been superseded by a newer one. More... | |
optimalOrder () | |
Get the default queue order to use if configuration does not specify one. More... | |
supportedOrders () | |
Get the allowed queue orders for configuration validation. More... | |
supportsDelayedJobs () | |
Find out if delayed jobs are supported for configuration validation. More... | |
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. More... | |
static | incrStats ($key, $type, $delta=1) |
Call wfIncrStats() for the queue overall and for the queue type. More... | |
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. More... | |
BagOStuff | $dupCache |
int | $maxTries |
Maximum number of times to try a job. More... | |
string | $order |
Job priority for pop() More... | |
string bool | $readOnlyReason |
Read only rationale (or false if r/w) More... | |
string | $type |
Job type. More... | |
string | $wiki |
Wiki ID. More... | |
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 32 of file JobQueueMemory.php.
|
protected |
Job | $job |
Definition at line 146 of file JobQueueMemory.php.
References JobQueue\getAcquiredCount(), and getQueueData().
|
protected |
IJobSpecification[] | $jobs | |
int | $flags |
Definition at line 42 of file JobQueueMemory.php.
References $job, as, getQueueData(), and serialize().
|
protected |
Definition at line 158 of file JobQueueMemory.php.
|
protected |
Definition at line 103 of file JobQueueMemory.php.
References getQueueData().
|
protected |
Definition at line 92 of file JobQueueMemory.php.
References getQueueData().
Referenced by doIsEmpty(), and doPop().
|
protected |
Definition at line 83 of file JobQueueMemory.php.
References doGetSize().
|
protected |
Definition at line 114 of file JobQueueMemory.php.
References $job, doGetSize(), getQueueData(), jobFromSpecInternal(), key, and order.
JobQueueMemory::getAllAcquiredJobs | ( | ) |
Definition at line 191 of file JobQueueMemory.php.
References $value, getQueueData(), and jobFromSpecInternal().
JobQueueMemory::getAllQueuedJobs | ( | ) |
Definition at line 172 of file JobQueueMemory.php.
References $value, getQueueData(), and jobFromSpecInternal().
|
private |
string | $field | |
mixed | $init |
Definition at line 220 of file JobQueueMemory.php.
References JobQueue\$type, JobQueue\$wiki, type, and wiki.
Referenced by doAck(), doBatchPush(), doGetAcquiredCount(), doGetSize(), doPop(), getAllAcquiredJobs(), and getAllQueuedJobs().
JobQueueMemory::jobFromSpecInternal | ( | IJobSpecification | $spec | ) |
IJobSpecification | $spec |
Definition at line 210 of file JobQueueMemory.php.
References Job\factory(), IJobSpecification\getParams(), IJobSpecification\getTitle(), and IJobSpecification\getType().
Referenced by doPop(), getAllAcquiredJobs(), and getAllQueuedJobs().
|
protected |
|
protected |
|
staticprotected |
Definition at line 34 of file JobQueueMemory.php.