* @ingroup Database
*/
+namespace Wikimedia\Rdbms;
+
+use IDatabase;
+use InvalidArgumentException;
+use BadMethodCallException;
+
/**
* An LBFactory class that always returns a single database object.
*/
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 name (unused)
- * @return LoadBalancerSingle
+ * @return LoadBalancerSingle[] Map of (cluster name => LoadBalancer)
*/
- public function newExternalLB( $cluster ) {
- return $this->lb;
+ public function getAllMainLBs() {
+ return [ 'DEFAULT' => $this->lb ];
}
/**
- * @param string $cluster External storage cluster name (unused)
- * @return LoadBalancerSingle
+ * @return LoadBalancerSingle[] Map of (cluster name => LoadBalancer)
*/
- public function getExternalLB( $cluster ) {
- return $this->lb;
+ public function getAllExternalLBs() {
+ return [];
}
/**