| 541 | } |
| 542 | |
| 543 | comm::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 |