MediaWiki  REL1_24
LoadMonitorMySQL Class Reference

Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time. More...

Inheritance diagram for LoadMonitorMySQL:
Collaboration diagram for LoadMonitorMySQL:

List of all members.

Public Member Functions

 __construct ($parent)
 Construct a new LoadMonitor with a given LoadBalancer parent.
 getLagTimes ($serverIndexes, $wiki)
 Return an estimate of replication lag for each server.
 scaleLoads (&$loads, $group=false, $wiki=false)
 Perform pre-connection load ratio adjustment.

Public Attributes

LoadBalancer $parent
 *

Protected Attributes

BagOStuff $cache
 *

Detailed Description

Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time.

Definition at line 74 of file LoadMonitor.php.


Constructor & Destructor Documentation

Construct a new LoadMonitor with a given LoadBalancer parent.

Parameters:
LoadBalancer$parent

Implements LoadMonitor.

Definition at line 78 of file LoadMonitor.php.

References $parent, $wgMemc, cache, global, and wfGetMainCache().


Member Function Documentation

LoadMonitorMySQL::getLagTimes ( serverIndexes,
wiki 
)

Return an estimate of replication lag for each server.

Parameters:
array$serverIndexes
string$wiki
Returns:
array

Implements LoadMonitor.

Definition at line 88 of file LoadMonitor.php.

LoadMonitorMySQL::scaleLoads ( &$  loads,
group = false,
wiki = false 
)

Perform pre-connection load ratio adjustment.

Parameters:
array$loads
string | bool$groupThe selected query group. Default: false
string | bool$wikiDefault: false

Implements LoadMonitor.

Definition at line 85 of file LoadMonitor.php.


Member Data Documentation

BagOStuff LoadMonitorMySQL::$cache [protected]

*

Definition at line 76 of file LoadMonitor.php.

LoadBalancer LoadMonitorMySQL::$parent

*

Definition at line 75 of file LoadMonitor.php.

Referenced by __construct().


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