X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FILoadBalancer.php;h=fec496e45591fb12fd3d0056cdc180131ff860eb;hb=628a3a9b267620914701a2a0a17bad8ab2e56498;hp=ae4362d9bbe4ce07b5a508d6e22bfe2069147c1d;hpb=8bda7b9dcdfbab485f439fbf4f41da1c84f5d62e;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index ae4362d9bb..fec496e455 100644 --- a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php +++ b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php @@ -101,7 +101,7 @@ interface ILoadBalancer { * - maxLag: Avoid replica DB servers with more lag than this [optional] * - srvCache : BagOStuff object for server cache [optional] * - wanCache : WANObjectCache object [optional] - * - chronologyProtector: ChronologyProtector object [optional] + * - chronologyCallback: Callback to run before the first connection attempt [optional] * - hostname : The name of the current server [optional] * - cliMode: Whether the execution context is a CLI script. [optional] * - profiler : Class name or instance with profileIn()/profileOut() methods. [optional] @@ -167,10 +167,13 @@ interface ILoadBalancer { /** * Get any open connection to a given server index, local or foreign * + * Use CONN_TRX_AUTOCOMMIT to only look for connections opened with that flag + * * @param int $i Server index or DB_MASTER/DB_REPLICA + * @param int $flags Bitfield of CONN_* class constants * @return Database|bool False if no such connection is open */ - public function getAnyOpenConnection( $i ); + public function getAnyOpenConnection( $i, $flags = 0 ); /** * Get a connection handle by server index @@ -183,7 +186,7 @@ interface ILoadBalancer { * call ILoadBalancer::reuseConnection() on the handle when finished using it. * In all other cases, this is not necessary, though not harmful either. * - * @param int $i Server index or DB_MASTER/DB_REPLICA + * @param int $i Server index (overrides $groups) or DB_MASTER/DB_REPLICA * @param array|string|bool $groups Query group(s), or false for the generic reader * @param string|bool $domain Domain ID, or false for the current domain * @param int $flags Bitfield of CONN_* class constants