|
MediaWiki master
|
PHP memory-backed job queue storage, for testing. More...
Inherits MediaWiki\JobQueue\JobQueue.

Public Member Functions | |
| __construct (array $params) | |
| getAllAcquiredJobs () | |
| getAllQueuedJobs () | |
| jobFromSpecInternal (IJobSpecification $spec) | |
Public Member Functions inherited from MediaWiki\JobQueue\JobQueue | |
| ack (RunnableJob $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 () | |
| Delete 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). | |
| getDomain () | |
| 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 () | |
| 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 (RunnableJob $job) | |||
| doBatchPush (array $jobs, $flags) | |||
| doDelete () | |||
| |||
| doGetAcquiredCount () | |||
| doGetSize () | |||
| doIsEmpty () | |||
| doPop () | |||
| optimalOrder () | |||
| supportedOrders () | |||
Protected Member Functions inherited from MediaWiki\JobQueue\JobQueue | |||
| assertNotReadOnly () | |||
| doDeduplicateRootJob (IJobSpecification $job) | |||
| doFlushCaches () | |||
| doGetAbandonedCount () | |||
| doGetDelayedCount () | |||
| doGetSiblingQueueSizes (array $types) | |||
| doGetSiblingQueuesWithJobs (array $types) | |||
| doIsRootJobOldDuplicate (IJobSpecification $job) | |||
| doWaitForBackups () | |||
| factoryJob ( $command, $params) | |||
| getRootJobCacheKey ( $signature, $type) | |||
| incrStats ( $event, $type, $delta=1) | |||
| Call StatsFactory::incrementBy() for the queue overall and for the queue type. | |||
| isRootJobOldDuplicate (IJobSpecification $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. | |||
| supportsTypeAgnostic () | |||
| Subclasses should set this to true if they support type agnostic queues. | |||
Static Protected Attributes | |
| static array[] | $data = [] |
Additional Inherited Members | |
Static Public Member Functions inherited from MediaWiki\JobQueue\JobQueue | |
| static | factory (array $params) |
| Get a job queue object of the specified type. | |
Protected Attributes inherited from MediaWiki\JobQueue\JobQueue | |
| int | $claimTTL |
| Time to live in seconds. | |
| string | $domain |
| DB domain ID. | |
| GlobalIdGenerator | $idGenerator |
| int | $maxTries |
| Maximum number of times to try a job. | |
| string | $order |
| Job priority for pop() | |
| string false | $readOnlyReason |
| Read only rationale (or false if r/w) | |
| StatsFactory | $stats |
| string | $type |
| Job type. | |
| bool | $typeAgnostic |
| WANObjectCache | $wanCache |
| const | QOS_ATOMIC = 1 |
| const | ROOTJOB_TTL = 28 * 24 * 3600 |
PHP memory-backed job queue storage, for testing.
JobQueueGroup does not remember every queue instance, so statically track it here.
Definition at line 22 of file JobQueueMemory.php.
| MediaWiki\JobQueue\JobQueueMemory::__construct | ( | array | $params | ) |
| array | $params |
|
| JobQueueError |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 26 of file JobQueueMemory.php.
|
protected |
| RunnableJob | $job |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 137 of file JobQueueMemory.php.
References $job, and MediaWiki\JobQueue\JobQueue\getAcquiredCount().
|
protected |
| IJobSpecification[] | $jobs | |
| int | $flags |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 38 of file JobQueueMemory.php.
References $job.
|
protected |
| JobQueueError |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 149 of file JobQueueMemory.php.
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 96 of file JobQueueMemory.php.
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 85 of file JobQueueMemory.php.
Referenced by MediaWiki\JobQueue\JobQueueMemory\doIsEmpty(), and MediaWiki\JobQueue\JobQueueMemory\doPop().
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 76 of file JobQueueMemory.php.
References MediaWiki\JobQueue\JobQueueMemory\doGetSize().
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 107 of file JobQueueMemory.php.
References $job, MediaWiki\JobQueue\JobQueueMemory\doGetSize(), and MediaWiki\JobQueue\JobQueueMemory\jobFromSpecInternal().
| MediaWiki\JobQueue\JobQueueMemory::getAllAcquiredJobs | ( | ) |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 175 of file JobQueueMemory.php.
References MediaWiki\JobQueue\JobQueueMemory\jobFromSpecInternal().
| MediaWiki\JobQueue\JobQueueMemory::getAllQueuedJobs | ( | ) |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 163 of file JobQueueMemory.php.
References MediaWiki\JobQueue\JobQueueMemory\jobFromSpecInternal().
| MediaWiki\JobQueue\JobQueueMemory::jobFromSpecInternal | ( | IJobSpecification | $spec | ) |
| IJobSpecification | $spec |
Definition at line 186 of file JobQueueMemory.php.
References MediaWiki\JobQueue\JobQueue\factoryJob(), and MediaWiki\JobQueue\IJobSpecification\getType().
Referenced by MediaWiki\JobQueue\JobQueueMemory\doPop(), MediaWiki\JobQueue\JobQueueMemory\getAllAcquiredJobs(), and MediaWiki\JobQueue\JobQueueMemory\getAllQueuedJobs().
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 67 of file JobQueueMemory.php.
|
protected |
Reimplemented from MediaWiki\JobQueue\JobQueue.
Definition at line 58 of file JobQueueMemory.php.
|
staticprotected |
Definition at line 24 of file JobQueueMemory.php.