1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-28 20:02:00 +03:00

Refactored provider specific code out of server_context.cpp

This commit is contained in:
Teemu Ollakka
2018-06-12 10:52:56 +03:00
parent 97d9f93648
commit d6f185c278
7 changed files with 270 additions and 224 deletions

View File

@ -37,6 +37,12 @@ namespace wsrep
static std::ostream& os_;
};
class log_error : public log
{
public:
log_error()
: log("ERROR") { }
};
class log_warning : public log
{
@ -45,6 +51,13 @@ namespace wsrep
: log("WARNING") { }
};
class log_info : public log
{
public:
log_info()
: log("INFO") { }
};
class log_debug : public log
{
public:

View File

@ -270,14 +270,16 @@ namespace wsrep
virtual std::vector<status_variable> status() const = 0;
/*!
* Return a pointer to native handle.
* Create a new provider.
*
* \todo This should be eventually deprecated.
* \param provider_spec Provider specification
* \param provider_options Initial options to provider
*/
// virtual struct wsrep* native() = 0;
// Factory method
static provider* make_provider(const std::string& provider);
private:
static provider* make_provider(
wsrep::server_context&,
const std::string& provider_spec,
const std::string& provider_options);
protected:
wsrep::server_context& server_context_;
};

View File

@ -173,6 +173,12 @@ namespace wsrep
*/
const std::string& address() const { return address_; }
/*!
* Return working directory
*
* \return String containing path to working directory.
*/
const std::string& working_dir() const { return working_dir_; }
/*!
* Get the rollback mode which server is operating in.
*