forked from codership/wsrep-lib
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathdb_high_priority_service.hpp
45 lines (41 loc) · 1.57 KB
/
db_high_priority_service.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
//
// 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 : public wsrep::high_priority_service
{
public:
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;
int apply_write_set(const wsrep::const_buffer&) override;
int append_fragment(const wsrep::ws_meta&, const wsrep::const_buffer&)
override
{ return 0; }
int commit(const wsrep::ws_handle&, const wsrep::ws_meta&) override;
int rollback() override;
int apply_toi(const wsrep::ws_meta&, const wsrep::const_buffer&) override;
void after_apply() override;
void store_globals() override { }
void reset_globals() override { }
void switch_execution_context(wsrep::high_priority_service&) 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