0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
FragmentData.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; 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 
26 
27 #ifndef Hypertable_RangeServer_FragmentData_h
28 #define Hypertable_RangeServer_FragmentData_h
29 
32 
34 #include <Hypertable/Lib/Key.h>
36 
37 #include <AsyncComm/Event.h>
38 
39 #include <Common/ByteString.h>
40 
41 #include <memory>
42 #include <vector>
43 
44 namespace Hypertable {
45 
48 
70  class FragmentData {
71  public:
72 
76 
80  virtual ~FragmentData();
81 
88  void add(EventPtr &event);
89 
94  void clear();
95 
107  void merge(TableIdentifier &table, RangePtr &range, CommitLogPtr &log);
108 
109  private:
110 
112  vector<EventPtr> m_data;
113 
116  };
117 
119  typedef std::shared_ptr<FragmentData> FragmentDataPtr;
120 
122 }
123 
124 #endif // Hypertable_RangeServer_FragmentData_h
Accumulates phantom update data for a phantom range.
Definition: FragmentData.h:70
std::shared_ptr< FragmentData > FragmentDataPtr
Smart pointer to FragmentData.
Definition: FragmentData.h:119
Declarations for TableIdentifier and TableIdentifierManaged.
vector< EventPtr > m_data
Vector of RangeServer::phantom_update() events.
Definition: FragmentData.h:112
std::shared_ptr< Event > EventPtr
Smart pointer to Event.
Definition: Event.h:228
void clear()
Clears the state.
Definition: FragmentData.cc:50
FragmentData()
Constructor.
Definition: FragmentData.h:75
Declarations for Event.
void merge(TableIdentifier &table, RangePtr &range, CommitLogPtr &log)
Adds accumulated data to phantom range and its transfer log.
Definition: FragmentData.cc:57
Declarations for ScanContext.
Declarations for Range.
Hypertable definitions
void add(EventPtr &event)
Adds an Event object representing a call to RangeServer::phantom_update().
Definition: FragmentData.cc:42
std::shared_ptr< Range > RangePtr
Smart pointer to Range.
Definition: Range.h:404
std::shared_ptr< CommitLog > CommitLogPtr
Smart pointer to CommitLog.
Definition: CommitLog.h:223
A serializable ByteString.
int64_t m_memory_consumption
Amount of memory accumulated (for memory tracking)
Definition: FragmentData.h:115
Declarations for CommitLog.
virtual ~FragmentData()
Destructor.
Definition: FragmentData.cc:38