MediaWiki  REL1_31
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 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 JobQueueAggregatorRedis, and JobQueueAggregatorNull.

Referenced by notifyQueueEmpty().

◆ doNotifyQueueNonEmpty()

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

Reimplemented in JobQueueAggregatorRedis, and JobQueueAggregatorNull.

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, 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 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, $wgJobQueueAggregator, and global.

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: