MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / nextUIDAfter

Method nextUIDAfter

pj_datastore/src/object_store.cpp:258–273  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

256}
257
258SequentialUID ObjectStore::nextUIDAfter(ObjectTopicId id, SequentialUID after) const {
259 std::shared_lock store_lock(store_mutex_);
260 const auto* series = findSeries(id);
261 if (series == nullptr) {
262 return {};
263 }
264
265 std::shared_lock lock(series->mutex);
266 const auto it = std::upper_bound(
267 series->entries.begin(), series->entries.end(), after,
268 [](SequentialUID uid, const ObjectEntry& entry) { return uid < entry.sequential_uid; });
269 if (it == series->entries.end()) {
270 return {};
271 }
272 return it->sequential_uid;
273}
274
275size_t ObjectStore::entryCount(ObjectTopicId id) const {
276 std::shared_lock store_lock(store_mutex_);

Callers 4

TESTFunction · 0.80
ingestNewerThanCursorMethod · 0.80
applyEntriesAfterMethod · 0.80
renderAtMethod · 0.80

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by 1

TESTFunction · 0.64