MediaWiki  1.23.2
LBFactorySingle Class Reference

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

Inheritance diagram for LBFactorySingle:
Collaboration diagram for LBFactorySingle:

Public Member Functions

 __construct ( $conf)
 
 forEachLB ( $callback, $params=array())
 
getExternalLB ( $cluster, $wiki=false)
 
 getMainLB ( $wiki=false)
 
 newExternalLB ( $cluster, $wiki=false)
 
 newMainLB ( $wiki=false)
 
- Public Member Functions inherited from LBFactory
 callMethod ( $loadBalancer, $methodName, $args)
 Private helper for forEachLBCallMethod. More...
 
 commitMasterChanges ()
 Commit changes on all master connections. More...
 
 forEachLBCallMethod ( $methodName, $args=array())
 Call a method of each tracked load balancer. More...
 
 hasMasterChanges ()
 Detemine if any master connection has pending changes. More...
 
 rollbackMasterChanges ()
 Rollback changes on all master connections. More...
 
 shutdown ()
 Prepare all tracked load balancers for shutdown STUB. More...
 

Protected 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 setInstance ( $instance)
 Set the instance to be the given object. More...
 
static & singleton ()
 Get an LBFactory instance. More...
 
- Static Protected Attributes inherited from LBFactory
static $instance
 

Detailed Description

An LBFactory class that always returns a single database object.

Definition at line 27 of file LBFactorySingle.php.

Constructor & Destructor Documentation

◆ __construct()

LBFactorySingle::__construct (   $conf)
Parameters
array$confAn associative array with one member:

Reimplemented from LBFactory.

Definition at line 34 of file LBFactorySingle.php.

Member Function Documentation

◆ forEachLB()

LBFactorySingle::forEachLB (   $callback,
  $params = array() 
)
Parameters
string | array$callback
array$params

Reimplemented from LBFactory.

Definition at line 76 of file LBFactorySingle.php.

References $params, and array().

◆ getExternalLB()

& LBFactorySingle::getExternalLB (   $cluster,
  $wiki = false 
)
Parameters
string$clusterexternal storage cluster, or false for core
bool | string$wikiWiki ID, or false for the current wiki
Returns
LoadBalancerSingle

Reimplemented from LBFactory.

Definition at line 68 of file LBFactorySingle.php.

References $lb.

◆ getMainLB()

LBFactorySingle::getMainLB (   $wiki = false)
Parameters
bool | string$wiki
Returns
LoadBalancerSingle

Reimplemented from LBFactory.

Definition at line 50 of file LBFactorySingle.php.

References $lb.

◆ newExternalLB()

LBFactorySingle::newExternalLB (   $cluster,
  $wiki = false 
)
Parameters
string$clusterExternal storage cluster, or false for core
bool | string$wikiWiki ID, or false for the current wiki
Returns
LoadBalancerSingle

Reimplemented from LBFactory.

Definition at line 59 of file LBFactorySingle.php.

References $lb.

◆ newMainLB()

LBFactorySingle::newMainLB (   $wiki = false)
Parameters
bool | string$wiki
Returns
LoadBalancerSingle

Reimplemented from LBFactory.

Definition at line 42 of file LBFactorySingle.php.

References $lb.

Member Data Documentation

◆ $lb

LoadBalancerSingle LBFactorySingle::$lb
protected

Definition at line 28 of file LBFactorySingle.php.

Referenced by getExternalLB(), getMainLB(), newExternalLB(), and newMainLB().


The documentation for this class was generated from the following file: