MediaWiki  1.27.4
LoadMonitor Interface Reference

An interface for database load monitoring. More...

Inheritance diagram for LoadMonitor:

Public Member Functions

 __construct ($parent)
 Construct a new LoadMonitor with a given LoadBalancer parent. More...
 
 clearCaches ()
 Clear any process and persistent cache of lag times. More...
 
 getLagTimes ($serverIndexes, $wiki)
 Get an estimate of replication lag (in seconds) for each server. More...
 
 scaleLoads (&$loads, $group=false, $wiki=false)
 Perform pre-connection load ratio adjustment. More...
 

Detailed Description

An interface for database load monitoring.

Definition at line 29 of file LoadMonitor.php.

Constructor & Destructor Documentation

LoadMonitor::__construct (   $parent)

Construct a new LoadMonitor with a given LoadBalancer parent.

Parameters
LoadBalancer$parent

Implemented in LoadMonitorNull, and LoadMonitorMySQL.

Member Function Documentation

LoadMonitor::clearCaches ( )

Clear any process and persistent cache of lag times.

Since
1.27

Implemented in LoadMonitorMySQL, and LoadMonitorNull.

LoadMonitor::getLagTimes (   $serverIndexes,
  $wiki 
)

Get an estimate of replication lag (in seconds) for each server.

Values may be "false" if replication is too broken to estimate

Parameters
array$serverIndexes
string$wiki
Returns
array Map of (server index => float|int|bool)

Implemented in LoadMonitorNull, and LoadMonitorMySQL.

LoadMonitor::scaleLoads ( $loads,
  $group = false,
  $wiki = false 
)

Perform pre-connection load ratio adjustment.

Parameters
array&$loads
string | bool$groupThe selected query group. Default: false
string | bool$wikiDefault: false

Implemented in LoadMonitorNull, and LoadMonitorMySQL.


The documentation for this interface was generated from the following file: