summaryrefslogtreecommitdiff
path: root/includes/db/LBFactory_Multi.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
committerPierre Schmitz <pierre@archlinux.de>2011-12-03 13:29:22 +0100
commitca32f08966f1b51fcb19460f0996bb0c4048e6fe (patch)
treeec04cc15b867bc21eedca904cea9af0254531a11 /includes/db/LBFactory_Multi.php
parenta22fbfc60f36f5f7ee10d5ae6fe347340c2ee67c (diff)
Update to MediaWiki 1.18.0
* also update ArchLinux skin to chagnes in MonoBook * Use only css to hide our menu bar when printing
Diffstat (limited to 'includes/db/LBFactory_Multi.php')
-rw-r--r--includes/db/LBFactory_Multi.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/includes/db/LBFactory_Multi.php b/includes/db/LBFactory_Multi.php
index 0d411ec6..61e56e78 100644
--- a/includes/db/LBFactory_Multi.php
+++ b/includes/db/LBFactory_Multi.php
@@ -98,6 +98,10 @@ class LBFactory_Multi extends LBFactory {
return $section;
}
+ /**
+ * @param $wiki string
+ * @return LoadBalancer
+ */
function newMainLB( $wiki = false ) {
list( $dbName, ) = $this->getDBNameAndPrefix( $wiki );
$section = $this->getSectionForWiki( $wiki );
@@ -111,6 +115,10 @@ class LBFactory_Multi extends LBFactory {
return $this->newLoadBalancer( $this->serverTemplate, $this->sectionLoads[$section], $groupLoads );
}
+ /**
+ * @param $wiki
+ * @return LoadBalancer
+ */
function getMainLB( $wiki = false ) {
$section = $this->getSectionForWiki( $wiki );
if ( !isset( $this->mainLBs[$section] ) ) {
@@ -122,6 +130,11 @@ class LBFactory_Multi extends LBFactory {
return $this->mainLBs[$section];
}
+ /**
+ * @param $cluster
+ * @param $wiki
+ * @return LoadBalancer
+ */
function newExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->externalLoads[$cluster] ) ) {
throw new MWException( __METHOD__.": Unknown cluster \"$cluster\"" );
@@ -136,6 +149,11 @@ class LBFactory_Multi extends LBFactory {
return $this->newLoadBalancer( $template, $this->externalLoads[$cluster], array() );
}
+ /**
+ * @param $cluster
+ * @param $wiki
+ * @return LoadBalancer
+ */
function &getExternalLB( $cluster, $wiki = false ) {
if ( !isset( $this->extLBs[$cluster] ) ) {
$this->extLBs[$cluster] = $this->newExternalLB( $cluster, $wiki );
@@ -146,6 +164,8 @@ class LBFactory_Multi extends LBFactory {
/**
* Make a new load balancer object based on template and load array
+ *
+ * @return LoadBalancer
*/
function newLoadBalancer( $template, $loads, $groupLoads ) {
global $wgMasterWaitTimeout;
@@ -159,6 +179,8 @@ class LBFactory_Multi extends LBFactory {
/**
* Make a server array as expected by LoadBalancer::__construct, using a template and load array
+ *
+ * @return array
*/
function makeServerArray( $template, $loads, $groupLoads ) {
$servers = array();