19 MaxHistorySize::setMaxHistorySize(maxSize);
27 result.removedSnapshots = this->truncate();
34 std::vector<EntitySnapshot> removedElements;
39 removedElements.push_back(std::move(this->
_container.begin()->second));
44 return removedElements;
49 std::vector<Memory::Base::UpdateResult>
53 std::map<std::string, std::vector<const EntityUpdate*>> updatesPerCoreSegment;
56 updatesPerCoreSegment[
update.entityID.coreSegmentName].push_back(&
update);
59 std::vector<Memory::Base::UpdateResult> result;
61 std::vector<std::string> missingCoreSegmentNames;
62 for (
const auto& [coreSegmentName, updates] : updatesPerCoreSegment)
64 auto it = this->
_container.find(coreSegmentName);
70 coreSegment.
doLocked([&result, &coreSegment, updates = &updates]()
75 Base::UpdateResult
ret { r };
77 result.push_back(
ret);
84 missingCoreSegmentNames.push_back(coreSegmentName);
88 if (not missingCoreSegmentNames.empty())
91 throw armem::error::MissingEntry::create<CoreSegment>(missingCoreSegmentNames.front(), *
this);
98 Memory::Base::UpdateResult
104 Base::UpdateResult result;