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

Refactored high priority service out of client service.

This commit is contained in:
Teemu Ollakka
2018-07-02 18:22:24 +03:00
parent 658a84a7d4
commit 635eaf4c29
28 changed files with 556 additions and 261 deletions

View File

@ -0,0 +1,46 @@
//
// Copyright (C) 2018 Codership Oy <info@codership.com>
//
#ifndef WSREP_DB_HIGH_PRIORITY_SERVICE_HPP
#define WSREP_DB_HIGH_PRIORITY_SERVICE_HPP
#include "wsrep/high_priority_service.hpp"
namespace db
{
class server;
class client;
class high_priority_service : 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;
int start_transaction(const wsrep::ws_handle&,
const wsrep::ws_meta&) override;
void adopt_transaction(const wsrep::transaction&) override;
int apply_write_set(const wsrep::const_buffer&) override;
int commit() override;
int rollback() override;
int apply_toi(const wsrep::const_buffer&) override;
void after_apply() override;
void store_globals() override { }
void reset_globals() override { }
int log_dummy_write_set(const wsrep::ws_handle&,
const wsrep::ws_meta&)
{ return 0; }
bool is_replaying() const;
private:
high_priority_service(const high_priority_service&);
high_priority_service& operator=(const high_priority_service&);
db::server& server_;
db::client* client_;
};
}
#endif // WSREP_DB_HIGH_PRIORITY_SERVICE_HPP