mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-07-31 18:24:25 +03:00
Defined log_state_change() interface in server_service.
The interface method can be used to notify the DBMS implementation about state changes in well defined order. The call will be done under server_state mutex protection.
This commit is contained in:
@ -17,6 +17,7 @@
|
||||
#define WSREP_CLIENT_STATE_HPP
|
||||
|
||||
#include "server_state.hpp"
|
||||
#include "server_service.hpp"
|
||||
#include "provider.hpp"
|
||||
#include "transaction.hpp"
|
||||
#include "client_id.hpp"
|
||||
@ -807,6 +808,20 @@ namespace wsrep
|
||||
enum wsrep::client_state::mode orig_mode_;
|
||||
};
|
||||
|
||||
class client_deleter
|
||||
{
|
||||
public:
|
||||
client_deleter(wsrep::server_service& server_service)
|
||||
: server_service_(server_service)
|
||||
{ }
|
||||
void operator()(wsrep::client_state* client_state)
|
||||
{
|
||||
server_service_.release_client_state(client_state);
|
||||
}
|
||||
private:
|
||||
wsrep::server_service& server_service_;
|
||||
};
|
||||
|
||||
template <class D>
|
||||
class scoped_client_state
|
||||
{
|
||||
|
Reference in New Issue
Block a user