MediaWiki REL1_32
|
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. | |
Public Member Functions inherited from Wikimedia\Rdbms\ConnectionManager | |
__construct (ILoadBalancer $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 45 of file SessionConsistentConnectionManager.php.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getReadConnection | ( | array | $groups = null | ) |
string[] | null | $groups |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 69 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 94 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\ConnectionManager\$groups.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnection | ( | ) |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 82 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\SessionConsistentConnectionManager\prepareForUpdates().
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnectionRef | ( | ) |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 107 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 58 of file SessionConsistentConnectionManager.php.
Referenced by Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnection(), and Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnectionRef().
|
private |
Definition at line 50 of file SessionConsistentConnectionManager.php.