0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AccessGroupHintsFile.h
Go to the documentation of this file.
1 /*
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; version 3 of the
9  * 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 
29 #ifndef HYPERTABLE_ACCESSGROUPHINTSFILE_H
30 #define HYPERTABLE_ACCESSGROUPHINTSFILE_H
31 
32 #include <vector>
33 
34 #include "AccessGroup.h"
35 
36 namespace Hypertable {
37 
92 
93  public:
94 
100  AccessGroupHintsFile(const String &table, const String &start_row,
101  const String &end_row);
102 
108  void change_start_row(const String &start_row);
109 
115  void change_end_row(const String &end_row);
116 
120  std::vector<AccessGroup::Hints> &get() {
121  return m_hints;
122  }
123 
127  void set(const std::vector<AccessGroup::Hints> &hints) {
128  m_hints = hints;
129  }
130 
134  void write(String location);
135 
138  void read();
139 
142  bool exists();
143 
144  private:
145 
150  void parse_header(const char *input, const char **ag_base);
151 
154 
157 
160 
163 
165  std::vector<AccessGroup::Hints> m_hints;
166  };
167 
168  /* @} */
169 
170 } // namespace Hypertable
171 
172 #endif // HYPERTABLE_ACCESSGROUPHINTSFILE_H
void change_end_row(const String &end_row)
Changes the end row.
Declarations for AccessGroup.
Reads and writes access group "hints" file.
void parse_header(const char *input, const char **ag_base)
Parses header portion of hints file.
AccessGroupHintsFile(const String &table, const String &start_row, const String &end_row)
Constructor.
std::string String
A String is simply a typedef to std::string.
Definition: String.h:44
void change_start_row(const String &start_row)
Changes the start row.
void set(const std::vector< AccessGroup::Hints > &hints)
Replaces contents of internal hints vector.
bool exists()
Checks if hints file exists.
std::vector< AccessGroup::Hints > m_hints
Vector of access group hints.
Hypertable definitions
void write(String location)
Write hints file.
String m_range_dir
Range subdirectory (md5 of end row)