MediaWiki
1.30.2
|
Database connection manager. More...
Public Member Functions | |
getReadConnection (array $groups=null) | |
getReadConnectionRef (array $groups=null) | |
getWriteConnection () | |
getWriteConnectionRef () | |
prepareForUpdates () | |
Forces all future calls to getReadConnection() to return a write connection. More... | |
Public Member Functions inherited from Wikimedia\Rdbms\ConnectionManager | |
__construct (LoadBalancer $loadBalancer, $domain=false, array $groups=[]) | |
releaseConnection (IDatabase $db) | |
Private Attributes | |
bool | $forceWriteConnection = false |
Database connection manager.
This manages access to master and replica databases. It also manages state that indicates whether the replica databases are possibly outdated after a write operation, and thus the master database should be used for subsequent read operations.
Definition at line 27 of file SessionConsistentConnectionManager.php.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getReadConnection | ( | array | $groups = null | ) |
string[] | null | $groups |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 51 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\ConnectionManager\$groups.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getReadConnectionRef | ( | array | $groups = null | ) |
string[] | null | $groups |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 76 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\ConnectionManager\$groups.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnection | ( | ) |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 64 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\SessionConsistentConnectionManager\prepareForUpdates().
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnectionRef | ( | ) |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 89 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\SessionConsistentConnectionManager\prepareForUpdates().
Wikimedia\Rdbms\SessionConsistentConnectionManager::prepareForUpdates | ( | ) |
Forces all future calls to getReadConnection() to return a write connection.
Use this before performing read operations that are critical for a future update.
Definition at line 40 of file SessionConsistentConnectionManager.php.
Referenced by Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnection(), and Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnectionRef().
|
private |
Definition at line 32 of file SessionConsistentConnectionManager.php.