MediaWiki REL1_39
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, WANObjectCache $wCache, array $options=[])
 Construct a new LoadMonitor with a given LoadBalancer parent.
 
 clearCaches ()
 
 getLagTimes (array $serverIndexes, $domain)
 Get an estimate of replication lag (in seconds) for each server.
 
 scaleLoads (array &$loads, $domain)
 Perform load ratio adjustment before deciding which server to use.
 
 setLogger (LoggerInterface $logger)
 
 setStatsdDataFactory (StatsdDataFactoryInterface $statsFactory)
 Sets a StatsdDataFactory instance on the object.
 

Detailed Description

Definition at line 31 of file LoadMonitorNull.php.

Constructor & Destructor Documentation

◆ __construct()

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

Construct a new LoadMonitor with a given LoadBalancer parent.

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

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 32 of file LoadMonitorNull.php.

Member Function Documentation

◆ clearCaches()

Wikimedia\Rdbms\LoadMonitorNull::clearCaches ( )

Definition at line 50 of file LoadMonitorNull.php.

◆ getLagTimes()

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
int[]$serverIndexes
string$domain
Returns
array Map of (server index => float|int|false)

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 46 of file LoadMonitorNull.php.

◆ scaleLoads()

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

Perform load ratio adjustment before deciding which server to use.

Parameters
int[]&$weightByServerMap of (server index => float weight)
string | false$domain

Implements Wikimedia\Rdbms\ILoadMonitor.

Definition at line 43 of file LoadMonitorNull.php.

◆ setLogger()

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

Definition at line 37 of file LoadMonitorNull.php.

◆ setStatsdDataFactory()

Wikimedia\Rdbms\LoadMonitorNull::setStatsdDataFactory ( StatsdDataFactoryInterface $statsFactory)

Sets a StatsdDataFactory instance on the object.

Parameters
StatsdDataFactoryInterface$statsFactory
Returns
null

Implements StatsdAwareInterface.

Definition at line 40 of file LoadMonitorNull.php.


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