Merge "rdbms: use Database::getDomainId for transaction logging calls"
[lhc/web/wiklou.git] / includes / libs / rdbms / lbfactory / ILBFactory.php
index 16d0e31..23699c7 100644 (file)
@@ -67,6 +67,22 @@ interface ILBFactory {
         */
        public function destroy();
 
+       /**
+        * Get the local (and default) database domain ID of connection handles
+        *
+        * @see DatabaseDomain
+        * @return string Database domain ID; this specifies DB name, schema, and table prefix
+        * @since 1.32
+        */
+       public function getLocalDomainID();
+
+       /**
+        * @param DatabaseDomain|string|bool $domain Database domain
+        * @return string Value of $domain if provided or the local domain otherwise
+        * @since 1.32
+        */
+       public function resolveDomainID( $domain );
+
        /**
         * Create a new load balancer object. The resulting object will be untracked,
         * not chronology-protected, and the caller is responsible for cleaning it up.
@@ -142,9 +158,13 @@ interface ILBFactory {
         * @param int $mode One of the class SHUTDOWN_* constants
         * @param callable|null $workCallback Work to mask ChronologyProtector writes
         * @param int|null &$cpIndex Position key write counter for ChronologyProtector
+        * @param string|null &$cpClientId Client ID hash for ChronologyProtector
         */
        public function shutdown(
-               $mode = self::SHUTDOWN_CHRONPROT_SYNC, callable $workCallback = null, &$cpIndex = null
+               $mode = self::SHUTDOWN_CHRONPROT_SYNC,
+               callable $workCallback = null,
+               &$cpIndex = null,
+               &$cpClientId = null
        );
 
        /**
@@ -225,7 +245,7 @@ interface ILBFactory {
 
        /**
         * Determine if any master connection has pending/written changes from this request
-        * @param float $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
+        * @param float|null $age How many seconds ago is "recent" [defaults to LB lag wait timeout]
         * @return bool
         */
        public function hasOrMadeRecentMasterChanges( $age = null );
@@ -318,7 +338,7 @@ interface ILBFactory {
        /**
         * Append ?cpPosIndex parameter to a URL for ChronologyProtector purposes if needed
         *
-        * Note that unlike cookies, this works accross domains
+        * Note that unlike cookies, this works across domains
         *
         * @param string $url
         * @param int $index Write counter index