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

Provide access to native wsrep API handle.

This commit is contained in:
Teemu Ollakka
2018-06-19 09:41:04 +03:00
parent 0e4c7f16a9
commit 5c3c972947
4 changed files with 14 additions and 0 deletions

View File

@ -275,6 +275,11 @@ namespace wsrep
virtual std::vector<status_variable> status() const = 0;
/**
* Return pointer to native provider handle.
*/
virtual void* native() const = 0;
/**
* Create a new provider.
*

View File

@ -673,3 +673,8 @@ wsrep::wsrep_provider_v26::status() const
}
return ret;
}
void* wsrep::wsrep_provider_v26::native() const
{
return wsrep_;
}

View File

@ -46,6 +46,7 @@ namespace wsrep
int sst_received(const wsrep::gtid& gtid, int);
std::vector<status_variable> status() const;
void* native() const;
private:
wsrep_provider_v26(const wsrep_provider_v26&);
wsrep_provider_v26& operator=(const wsrep_provider_v26);

View File

@ -199,8 +199,11 @@ namespace wsrep
{
return std::vector<status_variable>();
}
void* native() const { return 0; }
//
// Methods to modify mock state
//
/** Inject BF abort event into the provider.
*
* @param bf_seqno Aborter sequence number