MediaWiki  REL1_22
LoadMonitor Interface Reference

An interface for database load monitoring. More...

Inheritance diagram for LoadMonitor:

List of all members.

Public Member Functions

 __construct ($parent)
 Construct a new LoadMonitor with a given LoadBalancer parent.
 getLagTimes ($serverIndexes, $wiki)
 Return an estimate of replication lag for each server.
 postConnectionBackoff ($conn, $threshold)
 Perform post-connection backoff.
 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

LoadMonitor::__construct ( parent)

Construct a new LoadMonitor with a given LoadBalancer parent.

Parameters:
LoadBalancer$parent

Implemented in LoadMonitor_MySQL, and LoadMonitor_Null.


Member Function Documentation

LoadMonitor::getLagTimes ( serverIndexes,
wiki 
)

Return an estimate of replication lag for each server.

Parameters:
$serverIndexes
$wiki
Returns:
array

Implemented in LoadMonitor_MySQL, and LoadMonitor_Null.

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.

Parameters:
$connDatabaseBase
$thresholdFloat

Implemented in LoadMonitor_MySQL, and LoadMonitor_Null.

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

Perform pre-connection load ratio adjustment.

Parameters:
$loadsarray
string$groupthe selected query group
$wikiString

Implemented in LoadMonitor_MySQL, and LoadMonitor_Null.


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