Inherited by LBFactory_Multi, and LBFactory_Simple.
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. | |
forEachLBCallMethod ($methodName, $args=array()) | |
Call a method of each tracked load balancer. | |
callMethod ($loadBalancer, $methodName, $args) | |
Private helper for forEachLBCallMethod. | |
commitMasterChanges () | |
Commit changes on all master connections. | |
Static Public Member Functions | |
static & | singleton () |
Get an LBFactory instance. | |
static | destroyInstance () |
Shut down, close connections and destroy the cached instance. | |
Static Public Attributes | |
static | $instance |
Definition at line 11 of file LBFactory.php.
LBFactory::__construct | ( | $ | conf | ) | [abstract] |
Construct a factory based on a configuration array (typically from $wgLBFactoryConf).
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
LBFactory::callMethod | ( | $ | loadBalancer, | |
$ | methodName, | |||
$ | args | |||
) |
Private helper for forEachLBCallMethod.
Definition at line 101 of file LBFactory.php.
References $args.
LBFactory::commitMasterChanges | ( | ) |
Commit changes on all master connections.
Definition at line 108 of file LBFactory.php.
References forEachLBCallMethod().
Referenced by LBFactory_Multi::shutdown(), and LBFactory_Simple::shutdown().
static LBFactory::destroyInstance | ( | ) | [static] |
Shut down, close connections and destroy the cached instance.
Definition at line 30 of file LBFactory.php.
LBFactory::forEachLB | ( | $ | callback, | |
$ | params = array() | |||
) | [abstract] |
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 in LBFactory_Simple, and LBFactory_Multi.
Referenced by forEachLBCallMethod().
LBFactory::forEachLBCallMethod | ( | $ | methodName, | |
$ | args = array() | |||
) |
Call a method of each tracked load balancer.
Definition at line 94 of file LBFactory.php.
References $args, and forEachLB().
Referenced by commitMasterChanges().
& LBFactory::getExternalLB | ( | $ | cluster, | |
$ | wiki = false | |||
) | [abstract] |
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
LBFactory::getMainLB | ( | $ | wiki = false |
) | [abstract] |
Get a cached (tracked) load balancer object.
string | $wiki Wiki ID, or false for the current wiki |
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
LBFactory::newExternalLB | ( | $ | cluster, | |
$ | wiki = false | |||
) | [abstract] |
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
LBFactory::newMainLB | ( | $ | wiki = false |
) | [abstract] |
Create a new load balancer object.
The resulting object will be untracked, not chronology-protected, and the caller is responsible for cleaning it up.
string | $wiki Wiki ID, or false for the current wiki |
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
LBFactory::shutdown | ( | ) |
Prepare all tracked load balancers for shutdown STUB.
Reimplemented in LBFactory_Simple, and LBFactory_Multi.
Definition at line 89 of file LBFactory.php.
static& LBFactory::singleton | ( | ) | [static] |
Get an LBFactory instance.
Definition at line 17 of file LBFactory.php.
References $wgLBFactoryConf.
Referenced by wfGetLBFactory().
LBFactory::$instance [static] |
Definition at line 12 of file LBFactory.php.