MediaWiki REL1_28
|
An interface for database load monitoring. More...
Public Member Functions | |
__construct (ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache, array $options=[]) | |
Construct a new LoadMonitor with a given LoadBalancer parent. | |
getLagTimes (array $serverIndexes, $domain) | |
Get an estimate of replication lag (in seconds) for each server. | |
scaleLoads (array &$weightByServer, $domain) | |
Perform load ratio adjustment before deciding which server to use. | |
An interface for database load monitoring.
Definition at line 30 of file ILoadMonitor.php.
ILoadMonitor::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $sCache, | ||
BagOStuff | $cCache, | ||
array | $options = [] |
||
) |
Construct a new LoadMonitor with a given LoadBalancer parent.
ILoadBalancer | $lb | LoadBalancer this instance serves |
BagOStuff | $sCache | Local server memory cache |
BagOStuff | $cCache | Local cluster memory cache |
array | $options | Options map |
Implemented in LoadMonitorNull, LoadMonitor, and LoadMonitorMySQL.
ILoadMonitor::getLagTimes | ( | array | $serverIndexes, |
$domain | |||
) |
Get an estimate of replication lag (in seconds) for each server.
Values may be "false" if replication is too broken to estimate
integer[] | $serverIndexes | |
string | $domain |
Implemented in LoadMonitor, and LoadMonitorNull.
ILoadMonitor::scaleLoads | ( | array & | $weightByServer, |
$domain | |||
) |
Perform load ratio adjustment before deciding which server to use.
int[] | &$weightByServer | Map of (server index => float weight) |
string | bool | $domain |
Implemented in LoadMonitorNull, and LoadMonitor.