1
0
mirror of https://github.com/codership/wsrep-lib.git synced 2025-07-30 07:23:07 +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

@ -0,0 +1,26 @@
//
// Copyright (C) 2018 Codership Oy <info@codership.com>
//
#ifndef WSREP_DB_SERVER_CONTEXT_HPP
#define WSREP_DB_SERVER_CONTEXT_HPP
#include "wsrep/server_context.hpp"
#include <atomic>
namespace db
{
class server_context : public wsrep::server_context
{
public:
size_t next_transaction_id()
{
return (last_transaction_id_.fetch_add(1) + 1);
}
private:
std::atomic<size_t> last_transaction_id_;
};
}
#endif // WSREP_DB_SERVER_CONTEXT_HPP