* - servers : Required. Array of server info structures.
* - loadMonitor : Name of a class used to fetch server lag and load.
* - readOnlyReason : Reason the master DB is read-only if so [optional]
+ * - waitTimeout : Maximum time to wait for replicas for consistency [optional]
* - srvCache : BagOStuff object [optional]
* - wanCache : WANObjectCache object [optional]
* @throws MWException
throw new MWException( __CLASS__ . ': missing servers parameter' );
}
$this->mServers = $params['servers'];
- $this->mWaitTimeout = self::POS_WAIT_TIMEOUT;
+ $this->mWaitTimeout = isset( $params['waitTimeout'] )
+ ? $params['waitTimeout']
+ : self::POS_WAIT_TIMEOUT;
$this->mReadIndex = -1;
$this->mWriteIndex = -1;
return $fnames;
}
- /**
- * @param mixed $value
- * @return mixed
- */
- public function waitTimeout( $value = null ) {
- return wfSetVar( $this->mWaitTimeout, $value );
- }
-
/**
* @note This method will trigger a DB connection if not yet done
* @param string|bool $wiki Wiki ID, or false for the current wiki