Inherits LoadMonitor.
Public Member Functions | |
__construct ($parent) | |
Construct a new LoadMonitor with a given LoadBalancer parent. | |
scaleLoads (&$loads, $group=false, $wiki=false) | |
Perform pre-connection load ratio adjustment. | |
getLagTimes ($serverIndexes, $wiki) | |
Return an estimate of replication lag for each server. | |
postConnectionBackoff ($conn, $threshold) | |
Perform post-connection backoff. | |
Public Attributes | |
$parent |
Definition at line 51 of file LoadMonitor.php.
LoadMonitor_MySQL::__construct | ( | $ | parent | ) |
Construct a new LoadMonitor with a given LoadBalancer parent.
Implements LoadMonitor.
Definition at line 54 of file LoadMonitor.php.
References $parent.
LoadMonitor_MySQL::getLagTimes | ( | $ | serverIndexes, | |
$ | wiki | |||
) |
Return an estimate of replication lag for each server.
Implements LoadMonitor.
Definition at line 61 of file LoadMonitor.php.
References $i, $wgMemc, wfGetMainCache(), wfIncrStats(), wfMemcKey(), wfProfileIn(), and wfProfileOut().
LoadMonitor_MySQL::postConnectionBackoff | ( | $ | conn, | |
$ | threshold | |||
) |
Perform post-connection backoff.
If the connection is in overload, this should return a backoff factor which will be used to control polling time. The number of threads connected is a good measure.
If there is no overload, zero can be returned.
A threshold thread count is given, the concrete class may compare this to the running thread count. The threshold may be false, which indicates that the sysadmin has not configured this feature.
Database | $conn | |
float | $threshold |
Implements LoadMonitor.
Definition at line 112 of file LoadMonitor.php.
References $status.
LoadMonitor_MySQL::scaleLoads | ( | &$ | loads, | |
$ | group = false , |
|||
$ | wiki = false | |||
) |
Perform pre-connection load ratio adjustment.
array | $loads | |
string | $group The selected query group | |
string | $wiki |
Implements LoadMonitor.
Definition at line 58 of file LoadMonitor.php.
LoadMonitor_MySQL::$parent |