MediaWiki REL1_40
|
Database load monitoring interface. More...
Inherits LoggerAwareInterface, and StatsdAwareInterface.
Inherited by Wikimedia\Rdbms\LoadMonitor, and Wikimedia\Rdbms\LoadMonitorNull.
Public Member Functions | |
__construct (ILoadBalancer $lb, BagOStuff $sCache, WANObjectCache $wCache, array $options=[]) | |
Construct a new LoadMonitor with a given LoadBalancer parent. | |
getLagTimes (array $serverIndexes) | |
Get an estimate of replication lag (in seconds) for each server. | |
scaleLoads (array &$weightByServer) | |
Perform load ratio adjustment before deciding which server to use. | |
Public Member Functions inherited from StatsdAwareInterface | |
setStatsdDataFactory (StatsdDataFactoryInterface $statsFactory) | |
Sets a StatsdDataFactory instance on the object. | |
Database load monitoring interface.
Definition at line 32 of file ILoadMonitor.php.
Wikimedia\Rdbms\ILoadMonitor::__construct | ( | ILoadBalancer | $lb, |
BagOStuff | $sCache, | ||
WANObjectCache | $wCache, | ||
array | $options = [] ) |
Construct a new LoadMonitor with a given LoadBalancer parent.
ILoadBalancer | $lb | LoadBalancer this instance serves |
BagOStuff | $sCache | Local server memory cache |
WANObjectCache | $wCache | Local cluster memory cache |
array | $options | Options map |
Implemented in Wikimedia\Rdbms\LoadMonitorNull, and Wikimedia\Rdbms\LoadMonitor.
Wikimedia\Rdbms\ILoadMonitor::getLagTimes | ( | array | $serverIndexes | ) |
Get an estimate of replication lag (in seconds) for each server.
Values may be "false" if replication is too broken to estimate
int[] | $serverIndexes |
Implemented in Wikimedia\Rdbms\LoadMonitor, and Wikimedia\Rdbms\LoadMonitorNull.
Wikimedia\Rdbms\ILoadMonitor::scaleLoads | ( | array & | $weightByServer | ) |
Perform load ratio adjustment before deciding which server to use.
int[] | &$weightByServer | Map of (server index => float weight) |
Implemented in Wikimedia\Rdbms\LoadMonitorNull, and Wikimedia\Rdbms\LoadMonitor.