X-Git-Url: https://git.cyclocoop.org/%27.%24link.%27?a=blobdiff_plain;f=includes%2Flibs%2Frdbms%2Floadbalancer%2FILoadBalancer.php;h=fec496e45591fb12fd3d0056cdc180131ff860eb;hb=c91a71c5f608675df6205a945bdc4be29d81d21e;hp=a699b2341f58e9883be7a09ee13244e3c7f5978a;hpb=fe4f16a0e10909bcc4b68c3cad8298e5227b679d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/libs/rdbms/loadbalancer/ILoadBalancer.php b/includes/libs/rdbms/loadbalancer/ILoadBalancer.php index a699b2341f..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