/**
* @param array $params with keys:
* servers Required. Array of server info structures.
- * masterWaitTimeout Replication lag wait timeout
* loadMonitor Name of a class used to fetch server lag and load.
* @throws MWException
*/
throw new MWException( __CLASS__ . ': missing servers parameter' );
}
$this->mServers = $params['servers'];
-
- if ( isset( $params['waitTimeout'] ) ) {
- $this->mWaitTimeout = $params['waitTimeout'];
- } else {
- $this->mWaitTimeout = 10;
- }
+ $this->mWaitTimeout = 10;
$this->mReadIndex = -1;
$this->mWriteIndex = -1;
/**
* Get or set arbitrary data used by the parent object, usually an LBFactory
- * @param $x
+ * @param mixed $x
* @return mixed
*/
function parentInfo( $x = null ) {
/**
* Wait for a given slave to catch up to the master pos stored in $this
- * @param $index
- * @param $open bool
+ * @param int $index
+ * @param bool $open
* @return bool
*/
protected function doWait( $index, $open = false ) {
* Get a connection by index
* This is the main entry point for this class.
*
- * @param $i Integer: server index
- * @param array $groups query groups
+ * @param int $i Server index
+ * @param array $groups Query groups
* @param bool|string $wiki Wiki ID
*
* @throws MWException
*
* @see LoadBalancer::getConnection() for parameter information
*
- * @param integer $db
+ * @param int $db
* @param mixed $groups
* @param bool|string $wiki
* @return DBConnRef
*
* @see LoadBalancer::getConnection() for parameter information
*
- * @param integer $db
+ * @param int $db
* @param mixed $groups
* @param bool|string $wiki
* @return DBConnRef
* On error, returns false, and the connection which caused the
* error will be available via $this->mErrorConnection.
*
- * @param $i Integer server index
- * @param bool|string $wiki wiki ID to open
+ * @param int $i Server index
+ * @param bool|string $wiki Wiki ID to open
* @return DatabaseBase
*
* @access private
* On error, returns false, and the connection which caused the
* error will be available via $this->mErrorConnection.
*
- * @param $i Integer: server index
- * @param string $wiki wiki ID to open
+ * @param int $i Server index
+ * @param string $wiki Wiki ID to open
* @return DatabaseBase
*/
function openForeignConnection( $i, $wiki ) {
/**
* Test if the specified index represents an open connection
*
- * @param $index Integer: server index
+ * @param int $index Server index
* @access private
* @return bool
*/
* Returns a Database object whether or not the connection was successful.
* @access private
*
- * @param $server
- * @param $dbNameOverride bool
+ * @param array $server
+ * @param bool $dbNameOverride
* @throws MWException
* @return DatabaseBase
*/
/**
* Return the server info structure for a given index, or false if the index is invalid.
- * @param $i
- * @return bool
+ * @param int $i
+ * @return array|bool
*/
function getServerInfo( $i ) {
if ( isset( $this->mServers[$i] ) ) {
/**
* Sets the server info structure for the given index. Entry at index $i
* is created if it doesn't exist
- * @param $i
- * @param $serverInfo
+ * @param int $i
+ * @param array $serverInfo
*/
function setServerInfo( $i, $serverInfo ) {
$this->mServers[$i] = $serverInfo;
}
/**
- * @param $value null
- * @return Mixed
+ * @param mixed $value
+ * @return mixed
*/
function waitTimeout( $value = null ) {
return wfSetVar( $this->mWaitTimeout, $value );