MediaWiki REL1_32
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.
 
 notifyQueueEmpty ( $wiki, $type)
 Mark a queue as being empty.
 
 notifyQueueNonEmpty ( $wiki, $type)
 Mark a queue as being non-empty.
 
 purge ()
 Purge all of the aggregator information.
 

Static Public Member Functions

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

Protected Member Functions

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

Static Protected Attributes

static JobQueueAggregator $instance = null
 

Detailed Description

Class to handle tracking information about all queues.

Since
1.21

Definition at line 29 of file JobQueueAggregator.php.

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented in JobQueueAggregatorRedis.

Definition at line 36 of file JobQueueAggregator.php.

Member Function Documentation

◆ destroySingleton()

static JobQueueAggregator::destroySingleton ( )
staticfinal

Destroy the singleton instance.

Returns
void

Definition at line 63 of file JobQueueAggregator.php.

◆ doGetAllReadyWikiQueues()

JobQueueAggregator::doGetAllReadyWikiQueues ( )
abstractprotected

◆ doNotifyQueueEmpty()

JobQueueAggregator::doNotifyQueueEmpty (   $wiki,
  $type 
)
abstractprotected
See also
JobQueueAggregator::notifyQueueEmpty()
Parameters
string$wiki
string$type
Returns
bool

Reimplemented in JobQueueAggregatorNull, and JobQueueAggregatorRedis.

Referenced by notifyQueueEmpty().

◆ doNotifyQueueNonEmpty()

JobQueueAggregator::doNotifyQueueNonEmpty (   $wiki,
  $type 
)
abstractprotected
See also
JobQueueAggregator::notifyQueueNonEmpty()
Parameters
string$wiki
string$type
Returns
bool

Reimplemented in JobQueueAggregatorNull, and JobQueueAggregatorRedis.

Referenced by notifyQueueNonEmpty().

◆ 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 147 of file JobQueueAggregator.php.

References $type, $wgLocalDatabases, and as.

◆ 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 114 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 74 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 95 of file JobQueueAggregator.php.

References $type, and doNotifyQueueNonEmpty().

◆ purge()

JobQueueAggregator::purge ( )
final

Purge all of the aggregator information.

Returns
bool Success

Definition at line 130 of file JobQueueAggregator.php.

References $res, and doPurge().

◆ singleton()

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

Definition at line 43 of file JobQueueAggregator.php.

References $instance, and $wgJobQueueAggregator.

Referenced by JobQueueGroup\get().

Member Data Documentation

◆ $instance

JobQueueAggregator JobQueueAggregator::$instance = null
staticprotected

Definition at line 31 of file JobQueueAggregator.php.

Referenced by singleton().


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