mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-28 20:02:00 +03:00
Introduce set_provider_factory() method for server_state
This allows injecting an application allocated provider into server_state. After this virtual provider getter is unnecessary. Made the getter normal method and fixed unit tests accordingly.
This commit is contained in:
@ -30,6 +30,7 @@
|
||||
#include <cassert>
|
||||
#include <cstring>
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <ostream>
|
||||
@ -438,11 +439,12 @@ namespace wsrep
|
||||
* @param provider_options Initial options to provider
|
||||
* @param thread_service Optional thread service implementation.
|
||||
*/
|
||||
static provider* make_provider(wsrep::server_state&,
|
||||
const std::string& provider_spec,
|
||||
const std::string& provider_options,
|
||||
const wsrep::provider::services& services
|
||||
= wsrep::provider::services());
|
||||
static std::unique_ptr<provider> make_provider(
|
||||
wsrep::server_state&,
|
||||
const std::string& provider_spec,
|
||||
const std::string& provider_options,
|
||||
const wsrep::provider::services& services
|
||||
= wsrep::provider::services());
|
||||
|
||||
protected:
|
||||
wsrep::server_state& server_state_;
|
||||
|
Reference in New Issue
Block a user