MCPcopy Create free account
hub / github.com/Tencent/phxqueue / CleanForward

Method CleanForward

phxqueue/lock/lockdb.cpp:543–557  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543comm::RetCode LockDb::CleanForward(string &k) {
544 if (Type::MAP == type_) {
545 if (0 >= map_.size())
546 return comm::RetCode::RET_OK;
547 k = current_clean_key_;
548 auto it(map_.upper_bound(current_clean_key_));
549 if (map_.end() == it)
550 it = map_.begin();
551 current_clean_key_ = it->first;
552 } else {
553 return comm::RetCode::RET_ERR_NO_IMPL;
554 }
555
556 return comm::RetCode::RET_OK;
557}
558
559
560} // namespace lock

Callers 1

CleanLockMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected