MediaWiki master
ILoadMonitor.php
Go to the documentation of this file.
1<?php
6namespace Wikimedia\Rdbms;
7
8use Psr\Log\LoggerInterface;
12
19interface ILoadMonitor {
20 public const STATE_UP = 'up';
21 public const STATE_CONN_COUNT = 'conn_count';
22 public const STATE_AS_OF = 'time';
23
36 public function __construct(
37 ILoadBalancer $lb,
38 BagOStuff $sCache,
39 WANObjectCache $wCache,
40 LoggerInterface $logger,
41 StatsFactory $statsFactory,
42 $options
43 );
44
50 public function scaleLoads( array &$weightByServer );
51}
Abstract class for any ephemeral data store.
Definition BagOStuff.php:73
Multi-datacenter aware caching interface.
This is the primary interface for validating metrics definitions, caching defined metrics,...
This class is a delegate to ILBFactory for a given database cluster.
Database load monitoring interface.
scaleLoads(array &$weightByServer)
Perform load ratio adjustment before deciding which server to use.
__construct(ILoadBalancer $lb, BagOStuff $sCache, WANObjectCache $wCache, LoggerInterface $logger, StatsFactory $statsFactory, $options)
Construct a new LoadMonitor with a given LoadBalancer parent.