MediaWiki  REL1_22
JobQueueAggregator Class Reference

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

Inheritance diagram for JobQueueAggregator:

List of all members.

Public Member Functions

 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

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

Static Protected Attributes

static $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

JobQueueAggregator::__construct ( array params) [protected]
Parameters:
array$params

Reimplemented in JobQueueAggregatorMemc, and JobQueueAggregatorRedis.

Definition at line 37 of file JobQueueAggregator.php.


Member Function Documentation

static JobQueueAggregator::destroySingleton ( ) [static, final]

Destroy the singleton instance.

Returns:
void

Definition at line 62 of file JobQueueAggregator.php.

JobQueueAggregator::doNotifyQueueEmpty ( wiki,
type 
) [abstract, protected]
JobQueueAggregator::doNotifyQueueNonEmpty ( wiki,
type 
) [abstract, protected]
JobQueueAggregator::doPurge ( ) [abstract, 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 144 of file JobQueueAggregator.php.

References array(), as, global, and JobQueueGroup\singleton().

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, doGetAllReadyWikiQueues(), wfProfileIn(), and wfProfileOut().

JobQueueAggregator::notifyQueueEmpty ( wiki,
type 
) [final]

Mark a queue as being empty.

Parameters:
string$wiki
string$type
Returns:
bool Success

Definition at line 73 of file JobQueueAggregator.php.

References $ok, doNotifyQueueEmpty(), wfProfileIn(), and wfProfileOut().

JobQueueAggregator::notifyQueueNonEmpty ( wiki,
type 
) [final]

Mark a queue as being non-empty.

Parameters:
string$wiki
string$type
Returns:
bool Success

Definition at line 92 of file JobQueueAggregator.php.

References $ok, doNotifyQueueNonEmpty(), wfProfileIn(), and wfProfileOut().

Purge all of the aggregator information.

Returns:
bool Success

Definition at line 126 of file JobQueueAggregator.php.

References $res, doPurge(), wfProfileIn(), and wfProfileOut().

static JobQueueAggregator::singleton ( ) [static, final]
Returns:
JobQueueAggregator

Definition at line 42 of file JobQueueAggregator.php.

References $instance, and global.

Referenced by nextJobDB\execute().


Member Data Documentation

JobQueueAggregator::$instance = null [static, protected]

Definition at line 32 of file JobQueueAggregator.php.

Referenced by singleton().


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