libfoedus-core
FOEDUS Core Library
|
Iterator for one SequentialRecordBatch, or a page. More...
Iterator for one SequentialRecordBatch, or a page.
This class inlines per-record methods, but not per-page methods (eg initialization).
Definition at line 383 of file sequential_cursor.hpp.
#include <sequential_cursor.hpp>
Public Member Functions | |
SequentialRecordIterator () | |
SequentialRecordIterator (const SequentialRecordBatch *batch, Epoch from_epoch, Epoch to_epoch) | |
void | reset () |
bool | is_valid () const __attribute__((always_inline)) |
void | next () __attribute__((always_inline)) |
uint16_t | get_cur_record_length () const __attribute__((always_inline)) |
Epoch | get_cur_record_epoch () const __attribute__((always_inline)) |
void | copy_cur_record (char *out, uint16_t out_size) const __attribute__((always_inline)) |
Copies the current record to the given buffer. More... | |
const char * | get_cur_record_raw () const __attribute__((always_inline)) |
Directly returns a pointer to the current record. More... | |
const xct::RwLockableXctId * | get_cur_record_owner_id () const __attribute__((always_inline)) |
bool | in_epoch_range (Epoch epoch) const __attribute__((always_inline)) |
uint16_t | get_stat_skipped_records () const |
uint16_t | get_record_count () const |
const SequentialRecordBatch * | get_raw_batch () const |
foedus::storage::sequential::SequentialRecordIterator::SequentialRecordIterator | ( | ) |
Definition at line 127 of file sequential_cursor.cpp.
References foedus::INVALID_EPOCH.
foedus::storage::sequential::SequentialRecordIterator::SequentialRecordIterator | ( | const SequentialRecordBatch * | batch, |
Epoch | from_epoch, | ||
Epoch | to_epoch | ||
) |
Definition at line 139 of file sequential_cursor.cpp.
References ASSERT_ND, foedus::storage::sequential::SequentialRecordBatch::get_epoch_from_offset(), foedus::storage::sequential::SequentialRecordBatch::get_record_length(), in_epoch_range(), foedus::Epoch::is_valid(), and next().
|
inline |
Copies the current record to the given buffer.
This is safe even after the cursor moves on, but it incurs one memcpy.
Definition at line 425 of file sequential_cursor.hpp.
References ASSERT_ND, get_cur_record_raw(), and is_valid().
|
inline |
Definition at line 416 of file sequential_cursor.hpp.
References ASSERT_ND, and is_valid().
|
inline |
Definition at line 412 of file sequential_cursor.hpp.
References ASSERT_ND, and is_valid().
|
inline |
Definition at line 440 of file sequential_cursor.hpp.
References ASSERT_ND, foedus::storage::sequential::SequentialRecordBatch::get_owner_id_from_offset(), and is_valid().
|
inline |
Directly returns a pointer to the current record.
No memcpy, but note that the pointed address might become invalid once the cursor moves on. Use it with caution, like std::string::data().
Definition at line 436 of file sequential_cursor.hpp.
References ASSERT_ND, foedus::storage::sequential::SequentialRecordBatch::get_payload_from_offset(), and is_valid().
Referenced by copy_cur_record().
|
inline |
Definition at line 453 of file sequential_cursor.hpp.
|
inline |
Definition at line 451 of file sequential_cursor.hpp.
|
inline |
Definition at line 449 of file sequential_cursor.hpp.
|
inline |
Definition at line 444 of file sequential_cursor.hpp.
Referenced by next(), and SequentialRecordIterator().
|
inline |
Definition at line 392 of file sequential_cursor.hpp.
Referenced by copy_cur_record(), get_cur_record_epoch(), get_cur_record_length(), get_cur_record_owner_id(), and get_cur_record_raw().
|
inline |
Definition at line 393 of file sequential_cursor.hpp.
References foedus::assorted::align8(), ASSERT_ND, foedus::storage::sequential::SequentialRecordBatch::get_epoch_from_offset(), foedus::storage::sequential::SequentialRecordBatch::get_record_length(), in_epoch_range(), foedus::Epoch::is_valid(), LIKELY, and UNLIKELY.
Referenced by SequentialRecordIterator().
|
inline |
Definition at line 388 of file sequential_cursor.hpp.
Referenced by foedus::storage::sequential::SequentialCursor::next_batch().