MediaWiki REL1_27
|
LBFactory class that throws an error on any attempt to use it. More...
Public Member Functions | |
forEachLB ( $callback, array $params=[]) | |
Execute a function for each tracked load balancer The callback is called with the load balancer as the first parameter, and $params passed as the subsequent parameters. | |
& | getExternalLB ( $cluster, $wiki=false) |
Get a cached (tracked) load balancer for external storage. | |
getMainLB ( $wiki=false) | |
Get a cached (tracked) load balancer object. | |
newMainLB ( $wiki=false) | |
Create a new load balancer object. | |
Public Member Functions inherited from LBFactory | |
__construct (array $conf) | |
Construct a factory based on a configuration array (typically from $wgLBFactoryConf) | |
commitAll ( $fname=__METHOD__) | |
Commit on all connections. | |
commitMasterChanges ( $fname=__METHOD__, array $options=[]) | |
Commit changes on all master connections. | |
disableChronologyProtection () | |
Disable the ChronologyProtector for all load balancers. | |
hasMasterChanges () | |
Determine if any master connection has pending changes. | |
hasOrMadeRecentMasterChanges () | |
Determine if any master connection has pending/written changes from this request. | |
laggedSlaveUsed () | |
Detemine if any lagged slave connection was used. | |
rollbackMasterChanges ( $fname=__METHOD__) | |
Rollback changes on all master connections. | |
shutdown ( $flags=0) | |
Prepare all tracked load balancers for shutdown. | |
waitForReplication (array $opts=[]) | |
Waits for the slave DBs to catch up to the current master position. | |
Protected Member Functions | |
newExternalLB ( $cluster, $wiki=false) | |
Create a new load balancer for external storage. | |
Protected Member Functions inherited from LBFactory | |
newChronologyProtector () | |
shutdownChronologyProtector (ChronologyProtector $cp) | |
Additional Inherited Members | |
Static Public Member Functions inherited from LBFactory | |
static | destroyInstance () |
Shut down, close connections and destroy the cached instance. | |
static | disableBackend () |
Disables all access to the load balancer, will cause all database access to throw a DBAccessError. | |
static | getLBFactoryClass (array $config) |
Returns the LBFactory class to use and the load balancer configuration. | |
static | setInstance ( $instance) |
Set the instance to be the given object. | |
static | singleton () |
Get an LBFactory instance. | |
Public Attributes inherited from LBFactory | |
const | SHUTDOWN_NO_CHRONPROT = 1 |
Protected Attributes inherited from LBFactory | |
ChronologyProtector | $chronProt |
LoggerInterface | $logger |
string bool | $readOnlyReason = false |
Reason all LBs are read-only or false if not. | |
TransactionProfiler | $trxProfiler |
LBFactory class that throws an error on any attempt to use it.
This will typically be done via wfGetDB(). Call LBFactory::disableBackend() to start using this, and LBFactory::enableBackend() to return to normal behavior
Definition at line 30 of file LBFactoryFake.php.
LBFactoryFake::forEachLB | ( | $callback, | |
array | $params = [] |
||
) |
Execute a function for each tracked load balancer The callback is called with the load balancer as the first parameter, and $params passed as the subsequent parameters.
callable | $callback | |
array | $params |
Reimplemented from LBFactory.
Definition at line 47 of file LBFactoryFake.php.
& LBFactoryFake::getExternalLB | ( | $cluster, | |
$wiki = false |
|||
) |
Get a cached (tracked) load balancer for external storage.
string | $cluster | External storage cluster, or false for core |
bool | string | $wiki | Wiki ID, or false for the current wiki |
Reimplemented from LBFactory.
Definition at line 43 of file LBFactoryFake.php.
LBFactoryFake::getMainLB | ( | $wiki = false | ) |
Get a cached (tracked) load balancer object.
bool | string | $wiki | Wiki ID, or false for the current wiki |
Reimplemented from LBFactory.
Definition at line 35 of file LBFactoryFake.php.
|
protected |
Create a new load balancer for external storage.
The resulting object will be untracked, not chronology-protected, and the caller is responsible for cleaning it up.
string | $cluster | External storage cluster, or false for core |
bool | string | $wiki | Wiki ID, or false for the current wiki |
Reimplemented from LBFactory.
Definition at line 39 of file LBFactoryFake.php.
LBFactoryFake::newMainLB | ( | $wiki = false | ) |
Create a new load balancer object.
The resulting object will be untracked, not chronology-protected, and the caller is responsible for cleaning it up.
bool | string | $wiki | Wiki ID, or false for the current wiki |
Reimplemented from LBFactory.
Definition at line 31 of file LBFactoryFake.php.