LBFactory_Simple Class Reference

A simple single-master LBFactory that gets its configuration from the b/c globals. More...

Inherits LBFactory.

List of all members.

Public Member Functions

 __construct ($conf)
 Construct a factory based on a configuration array (typically from $wgLBFactoryConf).
 newMainLB ($wiki=false)
 Create a new load balancer object.
 getMainLB ($wiki=false)
 Get a cached (tracked) load balancer object.
 newExternalLB ($cluster, $wiki=false)
getExternalLB ($cluster, $wiki=false)
 forEachLB ($callback, $params=array())
 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.
 shutdown ()
 Prepare all tracked load balancers for shutdown STUB.

Public Attributes

 $mainLB
 $extLBs = array()
 $chronProt


Detailed Description

A simple single-master LBFactory that gets its configuration from the b/c globals.

Definition at line 116 of file LBFactory.php.


Constructor & Destructor Documentation

LBFactory_Simple::__construct ( conf  ) 

Construct a factory based on a configuration array (typically from $wgLBFactoryConf).

Reimplemented from LBFactory.

Definition at line 123 of file LBFactory.php.


Member Function Documentation

LBFactory_Simple::forEachLB ( callback,
params = array() 
)

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.

Reimplemented from LBFactory.

Definition at line 182 of file LBFactory.php.

References $lb.

& LBFactory_Simple::getExternalLB ( cluster,
wiki = false 
)

Reimplemented from LBFactory.

Definition at line 169 of file LBFactory.php.

References newExternalLB().

LBFactory_Simple::getMainLB ( wiki = false  ) 

Get a cached (tracked) load balancer object.

Parameters:
string $wiki Wiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 150 of file LBFactory.php.

References newMainLB().

LBFactory_Simple::newExternalLB ( cluster,
wiki = false 
)

Reimplemented from LBFactory.

Definition at line 159 of file LBFactory.php.

References $wgExternalServers.

Referenced by getExternalLB().

LBFactory_Simple::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.

Parameters:
string $wiki Wiki ID, or false for the current wiki
Returns:
LoadBalancer

Reimplemented from LBFactory.

Definition at line 127 of file LBFactory.php.

References $wgDBname, $wgDBpassword, $wgDBserver, $wgDBservers, $wgDBtype, $wgDBuser, $wgDebugDumpSql, and $wgMasterWaitTimeout.

Referenced by getMainLB().

LBFactory_Simple::shutdown (  ) 

Prepare all tracked load balancers for shutdown STUB.

Reimplemented from LBFactory.

Definition at line 191 of file LBFactory.php.

References LBFactory::commitMasterChanges().


Member Data Documentation

LBFactory_Simple::$chronProt

Definition at line 121 of file LBFactory.php.

LBFactory_Simple::$extLBs = array()

Definition at line 118 of file LBFactory.php.

LBFactory_Simple::$mainLB

Definition at line 117 of file LBFactory.php.


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

Generated on Sat Sep 5 02:08:40 2009 for MediaWiki by  doxygen 1.5.9