/**
* Perform pre-connection load ratio adjustment.
- * @param array $loads
+ * @param array &$loads
* @param string|bool $group The selected query group. Default: false
* @param string|bool $wiki Default: false
*/
public function scaleLoads( &$loads, $group = false, $wiki = false );
/**
- * Return an estimate of replication lag for each server
+ * Get an estimate of replication lag (in seconds) for each server
+ *
+ * Values may be "false" if replication is too broken to estimate
*
* @param array $serverIndexes
* @param string $wiki
*
- * @return array Map of (server index => seconds)
+ * @return array Map of (server index => float|int|bool)
*/
public function getLagTimes( $serverIndexes, $wiki );
+
+ /**
+ * Clear any process and persistent cache of lag times
+ * @since 1.27
+ */
+ public function clearCaches();
}
class LoadMonitorNull implements LoadMonitor {
public function getLagTimes( $serverIndexes, $wiki ) {
return array_fill_keys( $serverIndexes, 0 );
}
+
+ public function clearCaches() {
+
+ }
}