0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
SetState.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_RangeServer_Request_Parameters_SetState_h
28 #define Hypertable_Lib_RangeServer_Request_Parameters_SetState_h
29 
31 
32 #include <Common/Serializable.h>
33 
34 #include <string>
35 #include <vector>
36 
37 using namespace std;
38 
39 namespace Hypertable {
40 namespace Lib {
41 namespace RangeServer {
42 namespace Request {
43 namespace Parameters {
44 
47 
49  class SetState : public Serializable {
50  public:
51 
54  SetState() {}
55 
60  SetState(const vector<SystemVariable::Spec> &system_variables,
61  int64_t generation)
62  : m_system_variables(system_variables), m_generation(generation) { }
63 
66  const vector<SystemVariable::Spec> &system_variables() {
67  return m_system_variables;
68  }
69 
72  int64_t generation() const { return m_generation; }
73 
74  private:
75 
78  uint8_t encoding_version() const override;
79 
83  size_t encoded_length_internal() const override;
84 
87  void encode_internal(uint8_t **bufp) const override;
88 
95  void decode_internal(uint8_t version, const uint8_t **bufp,
96  size_t *remainp) override;
97 
99  vector<SystemVariable::Spec> m_system_variables;
100 
102  int64_t m_generation;
103 
104  };
105 
107 
108 }}}}}
109 
110 #endif // Hypertable_Lib_RangeServer_Request_Parameters_SetState_h
Request parameters for set state function.
Definition: SetState.h:49
Declarations for SystemVariable.
STL namespace.
vector< SystemVariable::Spec > m_system_variables
Vector of system variable specifications.
Definition: SetState.h:99
SetState(const vector< SystemVariable::Spec > &system_variables, int64_t generation)
Constructor.
Definition: SetState.h:60
const vector< SystemVariable::Spec > & system_variables()
Gets system variables.
Definition: SetState.h:66
Declarations for Serializable.
int64_t m_generation
System variable generation
Definition: SetState.h:102
Hypertable definitions
Mixin class that provides a standard serialization interface.
Definition: Serializable.h:65
int64_t generation() const
Gets system variable generation.
Definition: SetState.h:72