MediaWiki master
MediaWiki\DB\MWLBFactory Class Reference

MediaWiki-specific class for generating database load balancers. More...

Public Member Functions

 __construct (ServiceOptions $options, ConfiguredReadOnlyMode $readOnlyMode, ChronologyProtector $chronologyProtector, BagOStuff $srvCache, WANObjectCache $wanCache, CriticalSectionProvider $csProvider, StatsFactory $statsFactory, array $virtualDomains, TracerInterface $tracer, ?string $uniqueIdentifier=null)
 
 applyDefaultConfig (array $lbConf)
 
 getLBFactoryClass (array $config)
 Decide which LBFactory class to use.
 
 setDomainAliases (ILBFactory $lbFactory)
 

Static Public Member Functions

static logDeprecation (string $msg)
 Log a database deprecation warning.
 

Public Attributes

const APPLY_DEFAULT_CONFIG_OPTIONS
 
const CORE_VIRTUAL_DOMAINS
 

Detailed Description

MediaWiki-specific class for generating database load balancers.

Access: internal
For use by core ServiceWiring only.

Definition at line 49 of file MWLBFactory.php.

Constructor & Destructor Documentation

◆ __construct()

MediaWiki\DB\MWLBFactory::__construct ( ServiceOptions $options,
ConfiguredReadOnlyMode $readOnlyMode,
ChronologyProtector $chronologyProtector,
BagOStuff $srvCache,
WANObjectCache $wanCache,
CriticalSectionProvider $csProvider,
StatsFactory $statsFactory,
array $virtualDomains,
TracerInterface $tracer,
?string $uniqueIdentifier = null )
Parameters
ServiceOptions$options
ConfiguredReadOnlyMode$readOnlyMode
ChronologyProtector$chronologyProtector
BagOStuff$srvCache
WANObjectCache$wanCache
CriticalSectionProvider$csProvider
StatsFactory$statsFactory
string[]$virtualDomains
TracerInterface$tracer
?string$uniqueIdentifier

Definition at line 115 of file MWLBFactory.php.

Member Function Documentation

◆ applyDefaultConfig()

MediaWiki\DB\MWLBFactory::applyDefaultConfig ( array $lbConf)
Parameters
array$lbConfConfig for LBFactory::__construct()
Returns
array
Access: internal
For use with service wiring

Definition at line 144 of file MWLBFactory.php.

◆ getLBFactoryClass()

MediaWiki\DB\MWLBFactory::getLBFactoryClass ( array $config)

Decide which LBFactory class to use.

Access: internal
For use by ServiceWiring
Parameters
array$config(e.g. $wgLBFactoryConf)
Returns
class-string<LBFactory>

Definition at line 380 of file MWLBFactory.php.

◆ logDeprecation()

static MediaWiki\DB\MWLBFactory::logDeprecation ( string $msg)
static

Log a database deprecation warning.

Parameters
string$msgDeprecation message

Definition at line 412 of file MWLBFactory.php.

◆ setDomainAliases()

MediaWiki\DB\MWLBFactory::setDomainAliases ( ILBFactory $lbFactory)

Definition at line 396 of file MWLBFactory.php.

Member Data Documentation

◆ APPLY_DEFAULT_CONFIG_OPTIONS

const MediaWiki\DB\MWLBFactory::APPLY_DEFAULT_CONFIG_OPTIONS
Initial value:
= [
]
const SQLMode
Name constant for the SQLMode setting, for use with Config::get()
const DBtype
Name constant for the DBtype setting, for use with Config::get()
const DBname
Name constant for the DBname setting, for use with Config::get()
const DBprefix
Name constant for the DBprefix setting, for use with Config::get()
const DBssl
Name constant for the DBssl setting, for use with Config::get()
const DBserver
Name constant for the DBserver setting, for use with Config::get()
const ExternalServers
Name constant for the ExternalServers setting, for use with Config::get()
const DebugToolbar
Name constant for the DebugToolbar setting, for use with Config::get()
const DBmwschema
Name constant for the DBmwschema setting, for use with Config::get()
const DBport
Name constant for the DBport setting, for use with Config::get()
const SQLiteDataDir
Name constant for the SQLiteDataDir setting, for use with Config::get()
const DebugDumpSql
Name constant for the DebugDumpSql setting, for use with Config::get()
const DBpassword
Name constant for the DBpassword setting, for use with Config::get()
const DBcompress
Name constant for the DBcompress setting, for use with Config::get()
const DebugLogFile
Name constant for the DebugLogFile setting, for use with Config::get()
const DBStrictWarnings
Name constant for the DBStrictWarnings setting, for use with Config::get()
const VirtualDomainsMapping
Name constant for the VirtualDomainsMapping setting, for use with Config::get()
const DBservers
Name constant for the DBservers setting, for use with Config::get()
const DBuser
Name constant for the DBuser setting, for use with Config::get()
Access: internal
For use by ServiceWiring

Definition at line 70 of file MWLBFactory.php.

◆ CORE_VIRTUAL_DOMAINS

const MediaWiki\DB\MWLBFactory::CORE_VIRTUAL_DOMAINS
Initial value:
= [
'virtual-botpasswords',
'virtual-interwiki',
'virtual-interwiki-interlanguage',
ExternalLinksTable::VIRTUAL_DOMAIN,
TemplateLinksTable::VIRTUAL_DOMAIN,
ImageLinksTable::VIRTUAL_DOMAIN,
ExistenceLinksTable::VIRTUAL_DOMAIN,
InterwikiLinksTable::VIRTUAL_DOMAIN,
PageLinksTable::VIRTUAL_DOMAIN,
CategoryLinksTable::VIRTUAL_DOMAIN,
]

Definition at line 54 of file MWLBFactory.php.


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