LoadMonitor Interface Reference

An interface for database load monitoring. More...

Inherited by LoadMonitor_MySQL.

List of all members.

Public Member Functions

 __construct ($parent)
 Construct a new LoadMonitor with a given LoadBalancer parent.
 scaleLoads (&$loads, $group=false, $wiki=false)
 Perform pre-connection load ratio adjustment.
 postConnectionBackoff ($conn, $threshold)
 Perform post-connection backoff.
 getLagTimes ($serverIndexes, $wiki)
 Return an estimate of replication lag for each server.


Detailed Description

An interface for database load monitoring.

Definition at line 7 of file LoadMonitor.php.


Constructor & Destructor Documentation

LoadMonitor::__construct ( parent  ) 

Construct a new LoadMonitor with a given LoadBalancer parent.

Implemented in LoadMonitor_MySQL.


Member Function Documentation

LoadMonitor::getLagTimes ( serverIndexes,
wiki 
)

Return an estimate of replication lag for each server.

Implemented in LoadMonitor_MySQL.

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:
Database $conn
float $threshold

Implemented in LoadMonitor_MySQL.

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

Perform pre-connection load ratio adjustment.

Parameters:
array $loads
string $group The selected query group
string $wiki

Implemented in LoadMonitor_MySQL.


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

Generated on Sat Sep 5 02:08:41 2009 for MediaWiki by  doxygen 1.5.9