| 256 | } |
| 257 | |
| 258 | SequentialUID 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 | |
| 275 | size_t ObjectStore::entryCount(ObjectTopicId id) const { |
| 276 | std::shared_lock store_lock(store_mutex_); |