|
MediaWiki
master
|
An LBFactory class that always returns a single database object. More...


Public Member Functions | |
| __construct (array $conf) | |
| forEachLB ($callback, array $params=[]) | |
| & | getExternalLB ($cluster, $wiki=false) |
| getMainLB ($wiki=false) | |
| newMainLB ($wiki=false) | |
Public Member Functions inherited from LBFactory | |
| __construct (array $conf) | |
| Construct a factory based on a configuration array (typically from $wgLBFactoryConf) More... | |
| closeAll () | |
| Close all open database connections on all open load balancers. More... | |
| commitAll ($fname=__METHOD__, array $options=[]) | |
| Commit on all connections. More... | |
| commitMasterChanges ($fname=__METHOD__, array $options=[]) | |
| Commit changes on all master connections. More... | |
| destroy () | |
| Disables all load balancers. More... | |
| disableChronologyProtection () | |
| Disable the ChronologyProtector for all load balancers. More... | |
| 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. More... | |
| & | getExternalLB ($cluster, $wiki=false) |
| Get a cached (tracked) load balancer for external storage. More... | |
| getMainLB ($wiki=false) | |
| Get a cached (tracked) load balancer object. More... | |
| hasMasterChanges () | |
| Determine if any master connection has pending changes. More... | |
| hasOrMadeRecentMasterChanges () | |
| Determine if any master connection has pending/written changes from this request. More... | |
| laggedSlaveUsed () | |
| Detemine if any lagged slave connection was used. More... | |
| newMainLB ($wiki=false) | |
| Create a new load balancer object. More... | |
| rollbackMasterChanges ($fname=__METHOD__) | |
| Rollback changes on all master connections. More... | |
| shutdown ($flags=0) | |
| Prepare all tracked load balancers for shutdown. More... | |
| waitForReplication (array $opts=[]) | |
| Waits for the slave DBs to catch up to the current master position. More... | |
Protected Member Functions | |
| newExternalLB ($cluster, $wiki=false) | |
Protected Member Functions inherited from LBFactory | |
| newChronologyProtector () | |
| newExternalLB ($cluster, $wiki=false) | |
| Create a new load balancer for external storage. More... | |
| shutdownChronologyProtector (ChronologyProtector $cp) | |
Private Attributes | |
| LoadBalancerSingle | $lb |
Additional Inherited Members | |
Static Public Member Functions inherited from LBFactory | |
| static | destroyInstance () |
| Shut down, close connections and destroy the cached instance. More... | |
| static | disableBackend () |
| Disables all access to the load balancer, will cause all database access to throw a DBAccessError. More... | |
| static | getLBFactoryClass (array $config) |
| Returns the LBFactory class to use and the load balancer configuration. More... | |
| static | singleton () |
| Get an LBFactory instance. More... | |
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. More... | |
| TransactionProfiler | $trxProfiler |
An LBFactory class that always returns a single database object.
Definition at line 27 of file LBFactorySingle.php.
| LBFactorySingle::__construct | ( | array | $conf | ) |
| array | $conf | An associative array with one member:
|
Definition at line 35 of file LBFactorySingle.php.
| LBFactorySingle::forEachLB | ( | $callback, | |
| array | $params = [] |
||
| ) |
| string | callable | $callback | |
| array | $params |
Definition at line 82 of file LBFactorySingle.php.
References $params.
| & LBFactorySingle::getExternalLB | ( | $cluster, | |
$wiki = false |
|||
| ) |
| string | $cluster | External storage cluster, or false for core |
| bool | string | $wiki | Wiki ID, or false for the current wiki |
Definition at line 74 of file LBFactorySingle.php.
References $lb.
| LBFactorySingle::getMainLB | ( | $wiki = false | ) |
| bool | string | $wiki |
Definition at line 56 of file LBFactorySingle.php.
References $lb.
|
protected |
| string | $cluster | External storage cluster, or false for core |
| bool | string | $wiki | Wiki ID, or false for the current wiki |
Definition at line 65 of file LBFactorySingle.php.
References $lb.
| LBFactorySingle::newMainLB | ( | $wiki = false | ) |
| bool | string | $wiki |
Definition at line 48 of file LBFactorySingle.php.
References $lb.
|
private |
Definition at line 29 of file LBFactorySingle.php.
Referenced by getExternalLB(), getMainLB(), newExternalLB(), and newMainLB().