0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
CellStoreScannerIntervalReadahead.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 
27 
28 #ifndef Hypertable_RangeServer_CellStoreScannerIntervalReadahead_h
29 #define Hypertable_RangeServer_CellStoreScannerIntervalReadahead_h
30 
34 
35 #include <Common/DynamicBuffer.h>
36 
37 namespace Hypertable {
38 
40 
43 
46  template <typename IndexT>
48  public:
49 
50  typedef typename IndexT::iterator IndexIteratorT;
51 
52  CellStoreScannerIntervalReadahead(CellStorePtr &cellstore, IndexT *index,
53  SerializedKey start_key,SerializedKey end_key, ScanContext *scan_ctx);
55  virtual void forward();
56  virtual bool get(Key &key, ByteString &value);
57 
58  private:
59 
60  bool fetch_next_block_readahead(bool eob=false);
61 
63  BlockInfo m_block;
69  int32_t m_fd {-1};
70  int64_t m_offset {};
71  int64_t m_end_offset {};
73  bool m_eos {};
75  uint32_t m_oflags {};
76 
77  };
78 
80 
81 }
82 
83 #endif // Hypertable_RangeServer_CellStoreScannerIntervalReadahead_h
CellStoreScannerIntervalReadahead(CellStorePtr &cellstore, IndexT *index, SerializedKey start_key, SerializedKey end_key, ScanContext *scan_ctx)
Provides ability to efficiently scan over a portion of a cell store.
Scan context information.
Definition: ScanContext.h:52
A class managing one or more serializable ByteStrings.
Definition: ByteString.h:47
Declarations for CellStore.
A dynamic, resizable memory buffer.
bool fetch_next_block_readahead(bool eob=false)
This method fetches the 'next' compressed block of key/value pairs from the underlying CellStore...
Declarations for ScanContext.
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
Abstract base class for block compression codecs.