Cell list scanner over a buffer of cells. More...
#include <CellListScannerBuffer.h>
Classes | |
struct | LtKeyValueT |
STL Strict Weak Ordering for KeyValueT. More... | |
Public Member Functions | |
CellListScannerBuffer (ScanContextPtr &scan_ctx) | |
Constructor. More... | |
virtual | ~CellListScannerBuffer () |
Destructor. More... | |
void | add (const SerializedKey key, const ByteString value) |
Adds a key/value pair to the buffer. More... | |
virtual void | forward () |
virtual bool | get (Key &key, ByteString &value) |
virtual int64_t | get_disk_read () |
Public Member Functions inherited from Hypertable::CellListScanner | |
CellListScanner () | |
CellListScanner (ScanContext *scan_ctx) | |
virtual | ~CellListScanner () |
ScanContext * | scan_context () |
void | add_disk_read (int64_t amount) |
Private Types | |
typedef std::pair < SerializedKey, ByteString > | KeyValueT |
Key/value type. More... | |
typedef StlAllocator< KeyValueT > | KeyValueAllocT |
STL allocator for KeyValueT structure. More... | |
typedef std::vector< KeyValueT, KeyValueAllocT > | KeyValueVectorT |
Vector of KeyValueT with allocator. More... | |
Private Member Functions | |
void | initialize_for_scan () |
Sorts cells in preparation for scan. More... | |
Private Attributes | |
ScanContextPtr | m_scan_context |
Scan context. More... | |
KeyValueVectorT | m_cells |
Buffer (array) of cells to be returned. More... | |
KeyValueVectorT::iterator | m_iter |
Iterator pointing to next cell in m_cells to be returned. More... | |
ByteArena | m_arena |
Memory arena to hold serialized keys and values. More... | |
bool | m_initialized_for_scan {} |
Flag indicating if initialize_for_scan has been called. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Hypertable::CellListScanner | |
uint64_t | m_disk_read {} |
ScanContext * | m_scan_context_ptr {} |
Cell list scanner over a buffer of cells.
This concrete class if for situations where a list of cells with no backing store (CellCache, CellStore, etc.), needs to be returned via the CellListScanner interface. An example use case is pseudo-table scanners.
Definition at line 48 of file CellListScannerBuffer.h.
|
private |
STL allocator for KeyValueT structure.
Definition at line 79 of file CellListScannerBuffer.h.
|
private |
Key/value type.
Definition at line 76 of file CellListScannerBuffer.h.
|
private |
Vector of KeyValueT with allocator.
Definition at line 82 of file CellListScannerBuffer.h.
CellListScannerBuffer::CellListScannerBuffer | ( | ScanContextPtr & | scan_ctx | ) |
Constructor.
scan_ctx | Reference to scan context |
Definition at line 39 of file CellListScannerBuffer.cc.
|
inlinevirtual |
Destructor.
Definition at line 57 of file CellListScannerBuffer.h.
void CellListScannerBuffer::add | ( | const SerializedKey | key, |
const ByteString | value | ||
) |
Adds a key/value pair to the buffer.
key | Serialized key |
value | ByteString pointer to value |
Definition at line 43 of file CellListScannerBuffer.cc.
|
virtual |
Implements Hypertable::CellListScanner.
Definition at line 61 of file CellListScannerBuffer.cc.
|
virtual |
Implements Hypertable::CellListScanner.
Definition at line 68 of file CellListScannerBuffer.cc.
|
inlinevirtual |
Implements Hypertable::CellListScanner.
Definition at line 68 of file CellListScannerBuffer.h.
|
private |
Sorts cells in preparation for scan.
Definition at line 82 of file CellListScannerBuffer.cc.
|
private |
Memory arena to hold serialized keys and values.
Definition at line 101 of file CellListScannerBuffer.h.
|
private |
Buffer (array) of cells to be returned.
Definition at line 95 of file CellListScannerBuffer.h.
|
private |
Flag indicating if initialize_for_scan has been called.
Definition at line 104 of file CellListScannerBuffer.h.
|
private |
Iterator pointing to next cell in m_cells to be returned.
Definition at line 98 of file CellListScannerBuffer.h.
|
private |
Scan context.
Definition at line 92 of file CellListScannerBuffer.h.