MediaWiki REL1_27
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.
 
 clearCaches ()
 Clear any process and persistent cache of lag times.
 
 getLagTimes ( $serverIndexes, $wiki)
 Get an estimate of replication lag (in seconds) for each server.
 
 scaleLoads (&$loads, $group=false, $wiki=false)
 Perform pre-connection load ratio adjustment.
 

Detailed Description

An interface for database load monitoring.

Definition at line 29 of file LoadMonitor.php.

Constructor & Destructor Documentation

◆ __construct()

LoadMonitor::__construct (   $parent)

Construct a new LoadMonitor with a given LoadBalancer parent.

Parameters
LoadBalancer$parent

Implemented in LoadMonitorNull, and LoadMonitorMySQL.

Member Function Documentation

◆ clearCaches()

LoadMonitor::clearCaches ( )

Clear any process and persistent cache of lag times.

Since
1.27

Implemented in LoadMonitorNull, and LoadMonitorMySQL.

◆ getLagTimes()

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.

◆ scaleLoads()

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: