* - 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]
/**
* 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
* 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