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

Pass high_priority_service instead of void ptr for provider methods.

This commit is contained in:
Teemu Ollakka
2018-07-03 07:48:35 +03:00
parent 004244d203
commit 3632e7823c
9 changed files with 38 additions and 33 deletions

View File

@@ -6,12 +6,12 @@
#include "db_server.hpp"
#include "db_client.hpp"
int db::high_priority_service::apply(const wsrep::ws_handle& ws_handle,
const wsrep::ws_meta& ws_meta,
const wsrep::const_buffer& data)
{
return server_.server_state().on_apply(*this, ws_handle, ws_meta, data);
}
db::high_priority_service::high_priority_service(
db::server& server, db::client* client)
: wsrep::high_priority_service(server_.server_state())
, server_(server)
, client_(client)
{ }
int db::high_priority_service::start_transaction(
const wsrep::ws_handle& ws_handle,

View File

@@ -11,16 +11,10 @@ namespace db
{
class server;
class client;
class high_priority_service : wsrep::high_priority_service
class high_priority_service : public wsrep::high_priority_service
{
public:
high_priority_service(db::server& server, db::client* client)
: server_(server)
, client_(client)
{ }
int apply(const wsrep::ws_handle&, const wsrep::ws_meta&,
const wsrep::const_buffer&) override;
high_priority_service(db::server& server, db::client* client);
int start_transaction(const wsrep::ws_handle&,
const wsrep::ws_meta&) override;
void adopt_transaction(const wsrep::transaction&) override;