MediaWiki  master
LoadMonitorNull.php
Go to the documentation of this file.
1 <?php
22 namespace Wikimedia\Rdbms;
23 
24 use BagOStuff;
25 use Psr\Log\LoggerInterface;
26 use WANObjectCache;
27 
28 class LoadMonitorNull implements ILoadMonitor {
29  public function __construct(
30  ILoadBalancer $lb, BagOStuff $sCache, WANObjectCache $wCache, array $options = []
31  ) {
32  }
33 
34  public function setLogger( LoggerInterface $logger ) {
35  }
36 
37  public function scaleLoads( array &$loads, $domain ) {
38  }
39 
40  public function getLagTimes( array $serverIndexes, $domain ) {
41  return array_fill_keys( $serverIndexes, 0 );
42  }
43 
44  public function clearCaches() {
45  }
46 }
Wikimedia\Rdbms\ILoadMonitor
An interface for database load monitoring.
Definition: ILoadMonitor.php:35
Wikimedia\Rdbms
Definition: ChronologyProtector.php:24
BagOStuff
Class representing a cache/ephemeral data store.
Definition: BagOStuff.php:71
Wikimedia\Rdbms\LoadMonitorNull
Definition: LoadMonitorNull.php:28
Wikimedia\Rdbms\LoadMonitorNull\setLogger
setLogger(LoggerInterface $logger)
Definition: LoadMonitorNull.php:34
WANObjectCache
Multi-datacenter aware caching interface.
Definition: WANObjectCache.php:125
Wikimedia\Rdbms\LoadMonitorNull\getLagTimes
getLagTimes(array $serverIndexes, $domain)
Get an estimate of replication lag (in seconds) for each server.
Definition: LoadMonitorNull.php:40
Wikimedia\Rdbms\LoadMonitorNull\__construct
__construct(ILoadBalancer $lb, BagOStuff $sCache, WANObjectCache $wCache, array $options=[])
Construct a new LoadMonitor with a given LoadBalancer parent.
Definition: LoadMonitorNull.php:29
Wikimedia\Rdbms\LoadMonitorNull\clearCaches
clearCaches()
Definition: LoadMonitorNull.php:44
Wikimedia\Rdbms\ILoadBalancer
Database cluster connection, tracking, load balancing, and transaction manager interface.
Definition: ILoadBalancer.php:81
Wikimedia\Rdbms\LoadMonitorNull\scaleLoads
scaleLoads(array &$loads, $domain)
Perform load ratio adjustment before deciding which server to use.
Definition: LoadMonitorNull.php:37