Revert "objectcache: detect default getWithSetCallback() set options"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / ILBFactory.php
index d7ca7cd..5288c24 100644 (file)
@@ -86,28 +86,41 @@ interface ILBFactory {
 
        /**
         * Create a new load balancer for external storage. The resulting object will be
-        * untracked, not chronology-protected, and the caller is responsible for
-        * cleaning it up.
+        * untracked, not chronology-protected, and the caller is responsible for cleaning it up.
         *
         * This method is for only advanced usage and callers should almost always use
         * getExternalLB() instead. This method can be useful when a table is used as a
         * key/value store. In that cases, one might want to query it in autocommit mode
         * (DBO_TRX off) but still use DBO_TRX transaction rounds on other tables.
         *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $domain Domain ID, or false for the current domain
+        * @param string $cluster External storage cluster name
         * @return ILoadBalancer
         */
-       public function newExternalLB( $cluster, $domain = false );
+       public function newExternalLB( $cluster );
 
        /**
         * Get a cached (tracked) load balancer for external storage
         *
-        * @param string $cluster External storage cluster, or false for core
-        * @param bool|string $domain Domain ID, or false for the current domain
+        * @param string $cluster External storage cluster name
         * @return ILoadBalancer
         */
-       public function getExternalLB( $cluster, $domain = false );
+       public function getExternalLB( $cluster );
+
+       /**
+        * Get cached (tracked) load balancers for all main database clusters
+        *
+        * @return LoadBalancer[] Map of (cluster name => LoadBalancer)
+        * @since 1.29
+        */
+       public function getAllMainLBs();
+
+       /**
+        * Get cached (tracked) load balancers for all external database clusters
+        *
+        * @return LoadBalancer[] Map of (cluster name => LoadBalancer)
+        * @since 1.29
+        */
+       public function getAllExternalLBs();
 
        /**
         * Execute a function for each tracked load balancer
@@ -136,9 +149,9 @@ interface ILBFactory {
        public function flushReplicaSnapshots( $fname = __METHOD__ );
 
        /**
-        * Commit on all connections. Done for two reasons:
-        * 1. To commit changes to the masters.
-        * 2. To release the snapshot on all connections, master and replica DB.
+        * Commit open transactions on all connections. This is useful for two main cases:
+        *   - a) To commit changes to the masters.
+        *   - b) To release the snapshot on all connections, master and replica DBs.
         * @param string $fname Caller name
         * @param array $options Options map:
         *   - maxWriteDuration: abort if more than this much time was spent in write queries