size_t VirtualClock::advanceToNow() { if (mDestructing) { return 0; } assert(mMode == REAL_TIME); return advanceTo(now()); }
bool BtreeCursor::skipOutOfRangeKeysAndCheckEnd() { if ( !ok() ) { return false; } int ret = _boundsIterator->advance( currKeyNode().key ); if ( ret == -2 ) { bucket = DiskLoc(); return false; } else if ( ret == -1 ) { return false; } advanceTo( currKeyNode().key, ret, _boundsIterator->cmp() ); return true; }
Data get(int pos) { if (pos < 0) { std::stringstream str; str << "pos must be non-negative, but I was given " << pos << ". " << state(); throw std::range_error(str.str()); } if (pos < tail()) { std::stringstream str; str << "pos must not refer to discarded elements, but I was given " << pos << ". " << state(); throw std::range_error(str.str()); } advanceTo(pos); return _buffer.at(pos); }
bool BtreeCursor::skipOutOfRangeKeysAndCheckEnd() { if ( !ok() ) { return false; } int ret = _boundsIterator->advance( currKey() ); if ( ret == -2 ) { bucket = DiskLoc(); return false; } else if ( ret == -1 ) { ++_nscanned; return false; } ++_nscanned; advanceTo( currKey(), ret, _boundsIterator->after(), _boundsIterator->cmp(), _boundsIterator->inc() ); return true; }