dbms: Server: add improvements and the ability of waiting for a read event on several connections. [#METR-14410]

This commit is contained in:
Alexey Arno 2015-01-12 15:08:11 +03:00
parent 27d0de84b7
commit 631a1a2717
2 changed files with 6 additions and 4 deletions

View File

@ -28,7 +28,7 @@ public:
typedef PoolBase<Connection>::Entry Entry;
virtual Entry get(Settings * settings = nullptr) = 0;
virtual std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr)
virtual std::vector<Entry> getMany(Settings * settings = nullptr)
{
return std::vector<Entry>{ get(settings) };
}

View File

@ -57,11 +57,13 @@ public:
return Base::get(settings);
}
/** Выделяет до указанного количества соединений. */
std::vector<Entry> getMany(unsigned max_connections, Settings * settings = nullptr) override
/** Выделяет до указанного количества соединений для работы.
* Соединения предоставляют доступ к разным репликам одного шарда.
*/
std::vector<Entry> getMany(Settings * settings = nullptr) override
{
applyLoadBalancing(settings);
return Base::getMany(max_connections, settings);
return Base::getMany(settings);
}
protected: