Don't fallback from uk to ru
[lhc/web/wiklou.git] / includes / db / loadbalancer / LoadMonitor.php
index 4975ea1..e68cf1a 100644 (file)
@@ -36,21 +36,29 @@ interface LoadMonitor {
 
        /**
         * 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 {
@@ -63,4 +71,8 @@ class LoadMonitorNull implements LoadMonitor {
        public function getLagTimes( $serverIndexes, $wiki ) {
                return array_fill_keys( $serverIndexes, 0 );
        }
+
+       public function clearCaches() {
+
+       }
 }