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

Refactoring dbms simulator. Intermediate commit.

This commit is contained in:
Teemu Ollakka
2018-06-15 12:58:36 +03:00
parent cb3b2fbf9e
commit 4fbf1d0cf8
17 changed files with 771 additions and 68 deletions

View File

@ -5,6 +5,7 @@
#ifndef WSREP_BUFFER_HPP
#define WSREP_BUFFER_HPP
#include <cstddef>
#include <vector>
namespace wsrep

View File

@ -556,10 +556,10 @@ namespace wsrep
/*
* Friend declarations
*/
friend int server_context::on_apply(client_context&,
const wsrep::ws_handle&,
const wsrep::ws_meta&,
const wsrep::const_buffer&);
//friend int server_context::on_apply(client_context&,
// const wsrep::ws_handle&,
// const wsrep::ws_meta&,
// const wsrep::const_buffer&);
friend class client_context_switch;
friend class client_applier_mode;
friend class client_toi_mode;

View File

@ -11,10 +11,18 @@
* wsrep-lib operation or applier client needs to apply a write set.
*/
#ifndef WSREP_CLIENT_SERVICE_HPP
#define WSREP_CLIENT_SERVICE_HPP
#include "buffer.hpp"
#include "provider.hpp"
#include "mutex.hpp"
#include "lock.hpp"
namespace wsrep
{
class transaction_context;
class client_context;
class client_service
{
public:
@ -62,6 +70,10 @@ namespace wsrep
wsrep::client_context&, const wsrep::transaction_context&, wsrep::mutable_buffer&) = 0;
virtual void remove_fragments(const wsrep::transaction_context&) = 0;
//
// Applying interface
//
/*!
* Apply a write set.
*/
@ -77,6 +89,10 @@ namespace wsrep
*/
virtual int rollback(wsrep::client_context&) = 0;
//
// Interface to global server state
//
/*!
* Forcefully shut down the DBMS process or replication system.
* This may be called in situations where
@ -150,6 +166,6 @@ namespace wsrep
{
public:
};
}
#endif // WSREP_CLIENT_SERVICE_HPP