MediaWiki  REL1_19
LoadMonitor_MySQL 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 LoadMonitor_MySQL:
Collaboration diagram for LoadMonitor_MySQL:

List of all members.

Public Member Functions

 __construct ($parent)
 getLagTimes ($serverIndexes, $wiki)
 postConnectionBackoff ($conn, $threshold)
 scaleLoads (&$loads, $group=false, $wiki=false)

Public Attributes

 $parent

Detailed Description

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

Definition at line 85 of file LoadMonitor.php.


Constructor & Destructor Documentation

Parameters:
LoadBalancer$parent

Implements LoadMonitor.

Definition at line 95 of file LoadMonitor.php.

References $parent.


Member Function Documentation

LoadMonitor_MySQL::getLagTimes ( serverIndexes,
wiki 
)
Parameters:
$serverIndexes
$wiki
Returns:
array

Implements LoadMonitor.

Definition at line 112 of file LoadMonitor.php.

References $wgMemc, wfGetMainCache(), wfIncrStats(), wfMemcKey(), wfProfileIn(), and wfProfileOut().

Here is the call graph for this function:

LoadMonitor_MySQL::postConnectionBackoff ( conn,
threshold 
)
Parameters:
$connDatabaseBase
$threshold
Returns:
int

Implements LoadMonitor.

Definition at line 173 of file LoadMonitor.php.

References wfLogDBError().

Here is the call graph for this function:

LoadMonitor_MySQL::scaleLoads ( &$  loads,
group = false,
wiki = false 
)
Parameters:
$loads
$groupbool
$wikibool

Implements LoadMonitor.

Definition at line 104 of file LoadMonitor.php.


Member Data Documentation

LoadMonitor_MySQL::$parent

Definition at line 90 of file LoadMonitor.php.

Referenced by __construct().


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