0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
RelinquishAcknowledge.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_RelinquishAcknowledge_h
28 #define Hypertable_Lib_Master_Request_Parameters_RelinquishAcknowledge_h
29 
30 #include <Common/Serializable.h>
31 
34 
35 #include <string>
36 
37 using namespace std;
38 
39 namespace Hypertable {
40 namespace Lib {
41 namespace Master {
42 namespace Request {
43 namespace Parameters {
44 
47 
50  public:
51 
55 
62  RelinquishAcknowledge(const string &source, int64_t range_id,
63  const TableIdentifier &table,
64  const RangeSpec &range_spec)
65  : m_source(source), m_range_id(range_id), m_table(table),
66  m_range_spec(range_spec) { }
67 
70  const string& source() const { return m_source; }
71 
74  int64_t range_id() const { return m_range_id; }
75 
78  TableIdentifier &table() { return m_table; }
79 
82  RangeSpec &range_spec() { return m_range_spec; }
83 
84  private:
85 
88  uint8_t encoding_version() const override;
89 
93  size_t encoded_length_internal() const override;
94 
97  void encode_internal(uint8_t **bufp) const override;
98 
105  void decode_internal(uint8_t version, const uint8_t **bufp,
106  size_t *remainp) override;
107 
109  string m_source;
110 
112  int64_t m_range_id;
113 
116 
119 
120  };
121 
123 
124 }}}}}
125 
126 #endif // Hypertable_Lib_Master_Request_Parameters_RelinquishAcknowledge_h
Range specification.
Definition: RangeSpec.h:40
Declarations for TableIdentifier and TableIdentifierManaged.
TableIdentifierManaged m_table
Table identifier of table to which range belongs
STL namespace.
Wrapper for TableIdentifier providing member storage.
const string & source() const
Gets name of source RangeServer.
Declarations for RangeSpec and RangeSpecManaged.
Declarations for Serializable.
Hypertable definitions
int64_t range_id() const
Gets range MetaLog entry identifier.
Mixin class that provides a standard serialization interface.
Definition: Serializable.h:65
Request parameters for relinquish acknowledge operation.
RelinquishAcknowledge(const string &source, int64_t range_id, const TableIdentifier &table, const RangeSpec &range_spec)
Constructor.
Wrapper for RangeSpec providing member storage.
Definition: RangeSpec.h:89