MediaWiki  master
Wikimedia\Rdbms\LoadMonitorNull Class Reference
Inheritance diagram for Wikimedia\Rdbms\LoadMonitorNull:
Collaboration diagram for Wikimedia\Rdbms\LoadMonitorNull:

Public Member Functions

 __construct (ILoadBalancer $lb, BagOStuff $sCache, BagOStuff $cCache, array $options=[])
 Construct a new LoadMonitor with a given LoadBalancer parent. More...
 
 clearCaches ()
 
 getLagTimes (array $serverIndexes, $domain)
 Get an estimate of replication lag (in seconds) for each server. More...
 
 scaleLoads (array &$loads, $domain)
 Perform load ratio adjustment before deciding which server to use. More...
 
 setLogger (LoggerInterface $logger)
 

Detailed Description

Definition at line 27 of file LoadMonitorNull.php.

Constructor & Destructor Documentation

Wikimedia\Rdbms\LoadMonitorNull::__construct ( ILoadBalancer  $lb,
BagOStuff  $sCache,
BagOStuff  $cCache,
array  $options = [] 
)

Construct a new LoadMonitor with a given LoadBalancer parent.

Parameters
ILoadBalancer$lbLoadBalancer this instance serves
BagOStuff$sCacheLocal server memory cache
BagOStuff$cCacheLocal cluster memory cache
array$optionsOptions map

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 28 of file LoadMonitorNull.php.

Member Function Documentation

Wikimedia\Rdbms\LoadMonitorNull::clearCaches ( )

Definition at line 43 of file LoadMonitorNull.php.

Wikimedia\Rdbms\LoadMonitorNull::getLagTimes ( array  $serverIndexes,
  $domain 
)

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

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

Parameters
integer[]$serverIndexes
string$domain
Returns
array Map of (server index => float|int|bool)

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 39 of file LoadMonitorNull.php.

Wikimedia\Rdbms\LoadMonitorNull::scaleLoads ( array $weightByServer,
  $domain 
)

Perform load ratio adjustment before deciding which server to use.

Parameters
int[]&$weightByServer Map of (server index => float weight)
string | bool$domain

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 36 of file LoadMonitorNull.php.

Wikimedia\Rdbms\LoadMonitorNull::setLogger ( LoggerInterface  $logger)

Definition at line 33 of file LoadMonitorNull.php.


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