Merge "Adjust layout for saved filters empty state"
[lhc/web/wiklou.git] / includes / libs / rdbms / loadbalancer / ILoadBalancer.php
index 5d217e2..04a553c 100644 (file)
@@ -89,6 +89,11 @@ interface ILoadBalancer {
        /** @var int Alias for CONN_TRX_AUTOCOMMIT for b/c; deprecated since 1.31 */
        const CONN_TRX_AUTO = 1;
 
+       /** @var string Manager of ILoadBalancer instances is running post-commit callbacks */
+       const STAGE_POSTCOMMIT_CALLBACKS = 'stage-postcommit-callbacks';
+       /** @var string Manager of ILoadBalancer instances is running post-rollback callbacks */
+       const STAGE_POSTROLLBACK_CALLBACKS = 'stage-postrollback-callbacks';
+
        /**
         * Construct a manager of IDatabase connection objects
         *
@@ -112,6 +117,7 @@ interface ILoadBalancer {
         *  - perfLogger: PSR-3 logger instance. [optional]
         *  - errorLogger : Callback that takes an Exception and logs it. [optional]
         *  - deprecationLogger: Callback to log a deprecation warning. [optional]
+        *  - roundStage: STAGE_POSTCOMMIT_* class constant; for internal use [optional]
         * @throws InvalidArgumentException
         */
        public function __construct( array $params );
@@ -326,6 +332,13 @@ interface ILoadBalancer {
         */
        public function getServerName( $i );
 
+       /**
+        * Return the server info structure for a given index, or false if the index is invalid.
+        * @param int $i
+        * @return array|bool
+        */
+       public function getServerInfo( $i );
+
        /**
         * Get DB type of the server with the specified index
         *
@@ -439,12 +452,21 @@ interface ILoadBalancer {
        public function rollbackMasterChanges( $fname = __METHOD__ );
 
        /**
-        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshot
+        * Commit all replica DB transactions so as to flush any REPEATABLE-READ or SSI snapshots
         *
         * @param string $fname Caller name
         */
        public function flushReplicaSnapshots( $fname = __METHOD__ );
 
+       /**
+        * Commit all master DB transactions so as to flush any REPEATABLE-READ or SSI snapshots
+        *
+        * An error will be thrown if a connection has pending writes or callbacks
+        *
+        * @param string $fname Caller name
+        */
+       public function flushMasterSnapshots( $fname = __METHOD__ );
+
        /**
         * @return bool Whether a master connection is already open
         */