0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
PhantomUpdate.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_PhantomUpdate_h
28 #define Hypertable_Lib_RangeServer_Request_Parameters_PhantomUpdate_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 PhantomUpdate : public Serializable {
50  public:
51 
55 
62  PhantomUpdate(const String &location, int32_t plan_generation,
63  const QualifiedRangeSpec &range_spec, int32_t fragment)
64  : m_location(location.c_str()), m_plan_generation(plan_generation),
65  m_range_spec(range_spec), m_fragment(fragment) { }
66 
69  const char *location() const { return m_location; }
70 
73  int32_t plan_generation() const { return m_plan_generation; }
74 
77  const QualifiedRangeSpec &range_spec() const { return m_range_spec; }
78 
81  int32_t fragment() const { return m_fragment; }
82 
83  private:
84 
87  uint8_t encoding_version() const override;
88 
92  size_t encoded_length_internal() const override;
93 
96  void encode_internal(uint8_t **bufp) const override;
97 
104  void decode_internal(uint8_t version, const uint8_t **bufp,
105  size_t *remainp) override;
106 
108  const char *m_location;
109 
112 
115 
117  int32_t m_fragment;
118 
119  };
120 
122 
123 }}}}}
124 
125 #endif // Hypertable_Lib_RangeServer_Request_Parameters_PhantomUpdate_h
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
STL namespace.
Declarations for QualifiedRangeSpec and QualifiedRangeSpecManaged.
int32_t plan_generation() const
Gets plan generation.
Definition: PhantomUpdate.h:73
Declarations for Serializable.
Hypertable definitions
Mixin class that provides a standard serialization interface.
Definition: Serializable.h:65
Qualified (with table identifier) range specification.
Request parameters for phantom update function.
Definition: PhantomUpdate.h:49
const QualifiedRangeSpec & range_spec() const
Gets range specification.
Definition: PhantomUpdate.h:77
QualifiedRangeSpec m_range_spec
Qualified range specification.
PhantomUpdate(const String &location, int32_t plan_generation, const QualifiedRangeSpec &range_spec, int32_t fragment)
Constructor.
Definition: PhantomUpdate.h:62