MediaWiki
REL1_23
|
Basic MySQL load monitor with no external dependencies Uses memcached to cache the replication lag for a short time. More...
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 |
* |
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.
LoadMonitorMySQL::__construct | ( | $ | parent | ) |
Construct a new LoadMonitor with a given LoadBalancer parent.
LoadBalancer | $parent |
Implements LoadMonitor.
Definition at line 77 of file LoadMonitor.php.
References $parent.
LoadMonitorMySQL::getLagTimes | ( | $ | serverIndexes, |
$ | wiki | ||
) |
Return an estimate of replication lag for each server.
array | $serverIndexes | |
string | $wiki |
Implements LoadMonitor.
Definition at line 84 of file LoadMonitor.php.
References $section, $wgMemc, array(), as, empty, global, wfGetMainCache(), wfIncrStats(), and wfMemcKey().
LoadMonitorMySQL::scaleLoads | ( | &$ | loads, |
$ | group = false , |
||
$ | wiki = false |
||
) |
Perform pre-connection load ratio adjustment.
array | $loads | |
string | bool | $group | The selected query group. Default: false |
string | bool | $wiki | Default: false |
Implements LoadMonitor.
Definition at line 81 of file LoadMonitor.php.
LoadBalancer LoadMonitorMySQL::$parent |