0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CellStoreScanner.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_CellStoreScanner_h
28 #define Hypertable_RangeServer_CellStoreScanner_h
29 
33 
34 #include <Common/DynamicBuffer.h>
35 
36 #include <memory>
37 
38 namespace Hypertable {
39 
42 
45  template <typename IndexT>
47  public:
48 
49  CellStoreScanner(CellStorePtr &&cellstore, ScanContext *scan_ctx,
50  IndexT *indexp=0);
51  virtual ~CellStoreScanner();
52  void forward() override;
53  bool get(Key &key, ByteString &value) override;
54  int64_t get_disk_read() override;
55 
56  private:
58  std::unique_ptr<CellStoreScannerInterval> m_interval_scanners[3];
59  size_t m_interval_index {};
60  size_t m_interval_max {};
62  bool m_keys_only {};
63  bool m_eos {};
65  };
66 
68 
69 }
70 
71 #endif // Hypertable_RangeServer_CellStoreScanner_h
72 
CellStoreScanner(CellStorePtr &&cellstore, ScanContext *scan_ctx, IndexT *indexp=0)
std::unique_ptr< CellStoreScannerInterval > m_interval_scanners[3]
Provides the ability to scan over (query) a cell store.
Scan context information.
Definition: ScanContext.h:52
A dynamic, resizable and reference counted memory buffer.
Definition: DynamicBuffer.h:42
A class managing one or more serializable ByteStrings.
Definition: ByteString.h:47
Declarations for CellStore.
A dynamic, resizable memory buffer.
int64_t get_disk_read() override
std::shared_ptr< CellStore > CellStorePtr
Smart pointer to CellStore.
Definition: CellStore.h:340
Hypertable definitions
Provides access to internal components of opaque key.
Definition: Key.h:40