MediaWiki REL1_40
|
Database connection manager. More...
Inherits Wikimedia\Rdbms\ConnectionManager.
Public Member Functions | |
getReadConnection (?array $groups=null, int $flags=0) | |
getReadConnectionRef (array $groups=null) | |
getWriteConnection (int $flags=0) | |
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=[]) | |
getLazyReadConnectionRef (array $groups=null) | |
Returns a lazy-connecting database connection ref for reading. | |
getLazyWriteConnectionRef () | |
Returns a lazy-connecting database connection ref for updating. | |
releaseConnection (IDatabase $db) | |
Database connection manager.
This manages access to primary and replica databases. It also manages state that indicates whether the replica databases are possibly outdated after a write operation, and thus the primary database should be used for subsequent read operations.
Definition at line 43 of file SessionConsistentConnectionManager.php.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getReadConnection | ( | ?array | $groups = null, |
int | $flags = 0 ) |
string[] | null | $groups | |
int | $flags |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 69 of file SessionConsistentConnectionManager.php.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getReadConnectionRef | ( | array | $groups = null | ) |
string[] | null | $groups |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 98 of file SessionConsistentConnectionManager.php.
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnection | ( | int | $flags = 0 | ) |
int | $flags |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 85 of file SessionConsistentConnectionManager.php.
References Wikimedia\Rdbms\SessionConsistentConnectionManager\prepareForUpdates().
Wikimedia\Rdbms\SessionConsistentConnectionManager::getWriteConnectionRef | ( | ) |
Reimplemented from Wikimedia\Rdbms\ConnectionManager.
Definition at line 112 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 56 of file SessionConsistentConnectionManager.php.
Referenced by Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnection(), and Wikimedia\Rdbms\SessionConsistentConnectionManager\getWriteConnectionRef().