throw new InvalidArgumentException( "Missing 'connection' argument." );
}
- $this->lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
+ $lb = new LoadBalancerSingle( array_merge( $this->baseLoadBalancerParams(), $conf ) );
+ $this->initLoadBalancer( $lb );
+ $this->lb = $lb;
}
/**
}
/**
- * @param bool|string $wiki
+ * @param bool|string $domain (unused)
* @return LoadBalancerSingle
*/
- public function newMainLB( $wiki = false ) {
+ public function newMainLB( $domain = false ) {
return $this->lb;
}
/**
- * @param bool|string $wiki
+ * @param bool|string $domain (unused)
* @return LoadBalancerSingle
*/
- public function getMainLB( $wiki = false ) {
+ public function getMainLB( $domain = false ) {
return $this->lb;
}
+ public function newExternalLB( $cluster ) {
+ throw new BadMethodCallException( "Method is not supported." );
+ }
+
+ public function getExternalLB( $cluster ) {
+ throw new BadMethodCallException( "Method is not supported." );
+ }
+
/**
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $wiki Wiki ID, or false for the current wiki
- * @return LoadBalancerSingle
+ * @return LoadBalancerSingle[] Map of (cluster name => LoadBalancer)
*/
- public function newExternalLB( $cluster, $wiki = false ) {
- return $this->lb;
+ public function getAllMainLBs() {
+ return [ 'DEFAULT' => $this->lb ];
}
/**
- * @param string $cluster External storage cluster, or false for core
- * @param bool|string $wiki Wiki ID, or false for the current wiki
- * @return LoadBalancerSingle
+ * @return LoadBalancerSingle[] Map of (cluster name => LoadBalancer)
*/
- public function getExternalLB( $cluster, $wiki = false ) {
- return $this->lb;
+ public function getAllExternalLBs() {
+ return [];
}
/**