Wikibase
MediaWiki Wikibase extension
|
Encapsulation of access to MediaWiki DB related functionality that is commonly used in Wikibase. More...
Public Member Functions | |
__construct (ILBFactory $lbFactory, string $domainId, array $loadGroups=[]) | |
sessionConsistentConnections () | |
WARNING: Do not override the load-groups in individual method calls on SessionConsistentConnectionManager. | |
connections () | |
WARNING: Do not override the load-groups in individual method calls on ConnectionManager! Instead add them to the factory method! | |
replication () | |
getEmptyTransactionTicket (string $fname) | |
Only used in batch writing (replication aware). | |
commitAndWaitForReplication (string $fname, $ticket) | |
Only used in batch writing (replication aware). | |
autoReconfigure () | |
Reload the LBFactory configuration. | |
loadBalancer () | |
domain () | |
Public Attributes | |
const | LOAD_GROUP_FROM_CLIENT = 'from-client' |
const | LOAD_GROUP_FROM_REPO = 'from-repo' |
Private Attributes | |
$lbFactory | |
$domainId | |
$replicationWaiter | |
$loadGroups | |
$sessionConsistentConnectionManager = null | |
$connectionManager = null | |
Encapsulation of access to MediaWiki DB related functionality that is commonly used in Wikibase.
Using this class means in most cases only 1 service need be injected into a service instead of 3+ which would otherwise be needed to have access to the same functionality.
Do not type hint against this abstract class in Wikibase services. Instead, use either ClientDomainDb or RepoDomainDb depending on what kind of wiki is being accessed.
Wikibase\Lib\Rdbms\DomainDb::__construct | ( | ILBFactory | $lbFactory, |
string | $domainId, | ||
array | $loadGroups = [] ) |
Wikibase\Lib\Rdbms\DomainDb::autoReconfigure | ( | ) |
Reload the LBFactory configuration.
Long-running processes should call this regularly.
Wikibase\Lib\Rdbms\DomainDb::commitAndWaitForReplication | ( | string | $fname, |
$ticket ) |
Only used in batch writing (replication aware).
See https://www.mediawiki.org/wiki/Database_transactions#Splitting_writes_into_multiple_transactions
string | $fname | Caller name (e.g. METHOD) |
mixed | $ticket | Result of getEmptyTransactionTicket() |
Wikibase\Lib\Rdbms\DomainDb::connections | ( | ) |
WARNING: Do not override the load-groups in individual method calls on ConnectionManager! Instead add them to the factory method!
Wikibase\Lib\Rdbms\DomainDb::domain | ( | ) |
Wikibase\Lib\Rdbms\DomainDb::getEmptyTransactionTicket | ( | string | $fname | ) |
Only used in batch writing (replication aware).
See https://www.mediawiki.org/wiki/Database_transactions#Splitting_writes_into_multiple_transactions
string | $fname | Caller name (e.g. METHOD) |
Wikibase\Lib\Rdbms\DomainDb::loadBalancer | ( | ) |
Wikibase\Lib\Rdbms\DomainDb::replication | ( | ) |
Wikibase\Lib\Rdbms\DomainDb::sessionConsistentConnections | ( | ) |
WARNING: Do not override the load-groups in individual method calls on SessionConsistentConnectionManager.
Instead add them to the factory method!
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
const Wikibase\Lib\Rdbms\DomainDb::LOAD_GROUP_FROM_CLIENT = 'from-client' |
const Wikibase\Lib\Rdbms\DomainDb::LOAD_GROUP_FROM_REPO = 'from-repo' |