0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ReplayStatus.h
Go to the documentation of this file.
1 /* -*- c++ -*-
2  * Copyright (C) 2007-2015 Hypertable, Inc.
3  *
4  * This file is part of Hypertable.
5  *
6  * Hypertable is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License
8  * as published by the Free Software Foundation; either version 3
9  * of the License, or any later version.
10  *
11  * Hypertable is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
19  * 02110-1301, USA.
20  */
21 
26 
27 #ifndef Hypertable_Lib_Master_Request_Parameters_ReplayStatus_h
28 #define Hypertable_Lib_Master_Request_Parameters_ReplayStatus_h
29 
30 #include <Common/Serializable.h>
31 
32 #include <string>
33 
34 using namespace std;
35 
36 namespace Hypertable {
37 namespace Lib {
38 namespace Master {
39 namespace Request {
40 namespace Parameters {
41 
44 
46  class ReplayStatus : public Serializable {
47  public:
48 
52 
60  ReplayStatus(int64_t op_id, const std::string &location, int32_t plan_generation)
61  : m_op_id(op_id), m_location(location), m_plan_generation(plan_generation)
62  { }
63 
66  int64_t op_id() { return m_op_id; }
67 
70  const string& location() const { return m_location; }
71 
74  int32_t plan_generation() { return m_plan_generation; }
75 
76  private:
77 
80  uint8_t encoding_version() const override;
81 
85  size_t encoded_length_internal() const override;
86 
89  void encode_internal(uint8_t **bufp) const override;
90 
97  void decode_internal(uint8_t version, const uint8_t **bufp,
98  size_t *remainp) override;
99 
101  int64_t m_op_id {};
102 
104  string m_location;
105 
107  int32_t m_plan_generation {};
108  };
109 
111 
112 }}}}}
113 
114 #endif // Hypertable_Lib_Master_Request_Parameters_ReplayStatus_h
int32_t plan_generation()
Gets recovery plan generation.
Definition: ReplayStatus.h:74
STL namespace.
Request parameters for replay status operation.
Definition: ReplayStatus.h:46
Declarations for Serializable.
Hypertable definitions
Mixin class that provides a standard serialization interface.
Definition: Serializable.h:65
ReplayStatus(int64_t op_id, const std::string &location, int32_t plan_generation)
Constructor.
Definition: ReplayStatus.h:60
string m_location
Proxy name of RangeServer whose log is being replayed.
Definition: ReplayStatus.h:104
const string & location() const
Gets proxy name of RangeServer whose log is being replayed.
Definition: ReplayStatus.h:70
int64_t op_id()
Gets recovery operation ID.
Definition: ReplayStatus.h:66