MediaWiki  1.29.1
JobQueueAggregator Class Reference

Class to handle tracking information about all queues. More...

Inheritance diagram for JobQueueAggregator:
Collaboration diagram for JobQueueAggregator:

Public Member Functions

 __construct (array $params)
 
 getAllReadyWikiQueues ()
 Get the list of all of the queues with jobs. More...
 
 notifyQueueEmpty ( $wiki, $type)
 Mark a queue as being empty. More...
 
 notifyQueueNonEmpty ( $wiki, $type)
 Mark a queue as being non-empty. More...
 
 purge ()
 Purge all of the aggregator information. More...
 

Static Public Member Functions

static destroySingleton ()
 Destroy the singleton instance. More...
 
static singleton ()
 

Protected Member Functions

 doGetAllReadyWikiQueues ()
 
 doNotifyQueueEmpty ( $wiki, $type)
 
 doNotifyQueueNonEmpty ( $wiki, $type)
 
 doPurge ()
 
 findPendingWikiQueues ()
 Get all databases that have a pending job. More...
 

Static Protected Attributes

static JobQueueAggregator $instance = null
 

Detailed Description

Class to handle tracking information about all queues.

Since
1.21

Definition at line 30 of file JobQueueAggregator.php.

Constructor & Destructor Documentation

◆ __construct()

JobQueueAggregator::__construct ( array  $params)
Parameters
array$params

Reimplemented in JobQueueAggregatorRedis.

Definition at line 37 of file JobQueueAggregator.php.

Member Function Documentation

◆ destroySingleton()

static JobQueueAggregator::destroySingleton ( )
staticfinal

Destroy the singleton instance.

Returns
void

Definition at line 64 of file JobQueueAggregator.php.

◆ doGetAllReadyWikiQueues()

JobQueueAggregator::doGetAllReadyWikiQueues ( )
abstractprotected

◆ doNotifyQueueEmpty()

JobQueueAggregator::doNotifyQueueEmpty (   $wiki,
  $type 
)
abstractprotected

◆ doNotifyQueueNonEmpty()

JobQueueAggregator::doNotifyQueueNonEmpty (   $wiki,
  $type 
)
abstractprotected

◆ doPurge()

JobQueueAggregator::doPurge ( )
abstractprotected

◆ findPendingWikiQueues()

JobQueueAggregator::findPendingWikiQueues ( )
protected

Get all databases that have a pending job.

This poll all the queues and is this expensive.

Returns
array (job type => (list of wiki IDs))

Definition at line 142 of file JobQueueAggregator.php.

References $type, $wgLocalDatabases, as, global, and JobQueueGroup\singleton().

◆ getAllReadyWikiQueues()

JobQueueAggregator::getAllReadyWikiQueues ( )
final

Get the list of all of the queues with jobs.

Returns
array (job type => (list of wiki IDs))

Definition at line 109 of file JobQueueAggregator.php.

References $res, and doGetAllReadyWikiQueues().

◆ notifyQueueEmpty()

JobQueueAggregator::notifyQueueEmpty (   $wiki,
  $type 
)
final

Mark a queue as being empty.

Parameters
string$wiki
string$type
Returns
bool Success

Definition at line 75 of file JobQueueAggregator.php.

References $type, and doNotifyQueueEmpty().

◆ notifyQueueNonEmpty()

JobQueueAggregator::notifyQueueNonEmpty (   $wiki,
  $type 
)
final

Mark a queue as being non-empty.

Parameters
string$wiki
string$type
Returns
bool Success

Definition at line 93 of file JobQueueAggregator.php.

References $type, and doNotifyQueueNonEmpty().

◆ purge()

JobQueueAggregator::purge ( )
final

Purge all of the aggregator information.

Returns
bool Success

Definition at line 125 of file JobQueueAggregator.php.

References $res, and doPurge().

◆ singleton()

static JobQueueAggregator::singleton ( )
staticfinal
Exceptions
MWException
Returns
JobQueueAggregator

Definition at line 44 of file JobQueueAggregator.php.

References $instance, and global.

Referenced by JobQueueGroup\get().

Member Data Documentation

◆ $instance

JobQueueAggregator JobQueueAggregator::$instance = null
staticprotected

Definition at line 32 of file JobQueueAggregator.php.

Referenced by singleton().


The documentation for this class was generated from the following file: