Inherited by LoadMonitor_MySQL.
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. | |
postConnectionBackoff ($conn, $threshold) | |
Perform post-connection backoff. | |
getLagTimes ($serverIndexes, $wiki) | |
Return an estimate of replication lag for each server. |
Definition at line 7 of file LoadMonitor.php.
LoadMonitor::__construct | ( | $ | parent | ) |
LoadMonitor::getLagTimes | ( | $ | serverIndexes, | |
$ | wiki | |||
) |
LoadMonitor::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 |
Implemented in LoadMonitor_MySQL.
LoadMonitor::scaleLoads | ( | &$ | loads, | |
$ | group = false , |
|||
$ | wiki = false | |||
) |
Perform pre-connection load ratio adjustment.
array | $loads | |
string | $group The selected query group | |
string | $wiki |
Implemented in LoadMonitor_MySQL.