MediaWiki  1.23.6
JobQueueAggregatorRedis Class Reference

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

Inheritance diagram for JobQueueAggregatorRedis:
Collaboration diagram for JobQueueAggregatorRedis:

Protected Member Functions

 __construct (array $params)
 @params include: More...
 
 doGetAllReadyWikiQueues ()
 
 doNotifyQueueEmpty ( $wiki, $type)
 
 doNotifyQueueNonEmpty ( $wiki, $type)
 
 doPurge ()
 
 getConnection ()
 Get a connection to the server that handles all sub-queues for this queue. More...
 
 handleException (RedisConnRef $conn, $e)
 
- Protected Member Functions inherited from JobQueueAggregator
 findPendingWikiQueues ()
 Get all databases that have a pending job. More...
 

Protected Attributes

RedisConnectionPool $redisPool
 
array $servers
 List of Redis server addresses *. More...
 

Private Member Functions

 dencQueueName ( $name)
 
 encQueueName ( $type, $wiki)
 
 getReadyQueueKey ()
 

Additional Inherited Members

- Public Member Functions inherited from JobQueueAggregator
 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 inherited from JobQueueAggregator
static destroySingleton ()
 Destroy the singleton instance. More...
 
static singleton ()
 
- Static Protected Attributes inherited from JobQueueAggregator
static $instance = null
 

Detailed Description

Class to handle tracking information about all queues using PhpRedis.

Since
1.21

Definition at line 31 of file JobQueueAggregatorRedis.php.

Constructor & Destructor Documentation

◆ __construct()

JobQueueAggregatorRedis::__construct ( array  $params)
protected

@params include:

  • redisConfig : An array of parameters to RedisConnectionPool::__construct().
  • redisServers : Array of server entries, the first being the primary and the others being fallback servers. Each entry is either a hostname/port combination or the absolute path of a UNIX socket. If a hostname is specified but no port, the standard port number 6379 will be used. Required.
    Parameters
    array$params

Reimplemented from JobQueueAggregator.

Definition at line 46 of file JobQueueAggregatorRedis.php.

References $params, array(), servers, and RedisConnectionPool\singleton().

Member Function Documentation

◆ dencQueueName()

JobQueueAggregatorRedis::dencQueueName (   $name)
private
Parameters
string$name
Returns
string

Definition at line 199 of file JobQueueAggregatorRedis.php.

References $name, $type, array(), and list.

Referenced by doGetAllReadyWikiQueues().

◆ doGetAllReadyWikiQueues()

◆ doNotifyQueueEmpty()

JobQueueAggregatorRedis::doNotifyQueueEmpty (   $wiki,
  $type 
)
protected

◆ doNotifyQueueNonEmpty()

JobQueueAggregatorRedis::doNotifyQueueNonEmpty (   $wiki,
  $type 
)
protected

◆ doPurge()

JobQueueAggregatorRedis::doPurge ( )
protected

◆ encQueueName()

JobQueueAggregatorRedis::encQueueName (   $type,
  $wiki 
)
private
Parameters
string$type
string$wiki
Returns
string

Definition at line 191 of file JobQueueAggregatorRedis.php.

References $type.

Referenced by doGetAllReadyWikiQueues(), doNotifyQueueEmpty(), and doNotifyQueueNonEmpty().

◆ getConnection()

JobQueueAggregatorRedis::getConnection ( )
protected

Get a connection to the server that handles all sub-queues for this queue.

Returns
RedisConnRef|bool Returns false on failure
Exceptions
MWException

Definition at line 158 of file JobQueueAggregatorRedis.php.

References as, and servers.

Referenced by doGetAllReadyWikiQueues(), doNotifyQueueEmpty(), doNotifyQueueNonEmpty(), and doPurge().

◆ getReadyQueueKey()

JobQueueAggregatorRedis::getReadyQueueKey ( )
private

◆ handleException()

JobQueueAggregatorRedis::handleException ( RedisConnRef  $conn,
  $e 
)
protected
Parameters
RedisConnRef$conn
RedisException$e
Returns
void

Definition at line 175 of file JobQueueAggregatorRedis.php.

References $e.

Referenced by doGetAllReadyWikiQueues(), doNotifyQueueEmpty(), doNotifyQueueNonEmpty(), and doPurge().

Member Data Documentation

◆ $redisPool

RedisConnectionPool JobQueueAggregatorRedis::$redisPool
protected

Definition at line 32 of file JobQueueAggregatorRedis.php.

◆ $servers

array JobQueueAggregatorRedis::$servers
protected

List of Redis server addresses *.

Definition at line 34 of file JobQueueAggregatorRedis.php.


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