~jheiss/galera/galera

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
46
/* Copyright (C) 2011-2013 Codership Oy <info@codership.com> */

#ifndef _GARB_GCS_HPP_
#define _GARB_GCS_HPP_

#include <gcs.h>
#include <galerautils.hpp>

namespace garb
{

class Gcs
{
public:

    Gcs (gu::Config&        conf,
         const std::string& name,
         const std::string& address,
         const std::string& group);

    ~Gcs ();

    void recv (gcs_action& act);

    void request_state_transfer (const std::string& request,
                                 const std::string& donor);

    void join (gcs_seqno_t);

    void set_last_applied(gcs_seqno_t);

    void close ();

private:

    bool        closed_;
    gcs_conn_t* gcs_;

    Gcs (const Gcs&);
    Gcs& operator= (const Gcs&);

}; /* class Gcs */

} /* namespace garb */

#endif /* _GARB_GCS_HPP_ */