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

Method UpdateDeuqueStat

phxqueue/store/storemeta.cpp:227–237  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227void StoreMetaQueue::UpdateDeuqueStat(const StoreMeta &meta) {
228 lock_guard<mutex> lock_guard(impl_->lock);
229
230 if (-1 == meta.GetCursorID()) return;
231
232 auto &&it = impl_->metas.lower_bound(meta);
233 if (it == impl_->metas.end()) return;
234 if (-1 == impl_->last_dequeue_meta.GetCursorID() || impl_->last_dequeue_meta < *it) {
235 impl_->last_dequeue_meta = *it;
236 }
237}
238
239int StoreMetaQueue::Size() {
240 lock_guard<mutex> lock_guard(impl_->lock);

Callers 1

SyncCursorIDMethod · 0.80

Calls 1

GetCursorIDMethod · 0.45

Tested by

no test coverage detected