19 std::string containerID = (this->
id()).
str();
20 MaxHistorySize::setMaxHistorySize(maxSize, containerID);
28 result.removedSnapshots = this->truncate();
35 std::vector<EntitySnapshot> removedElements;
40 removedElements.push_back(std::move(this->
_container.begin()->second));
45 return removedElements;
50 std::vector<Memory::Base::UpdateResult>
54 std::map<std::string, std::vector<const EntityUpdate*>> updatesPerCoreSegment;
57 updatesPerCoreSegment[
update.entityID.coreSegmentName].push_back(&
update);
60 std::vector<Memory::Base::UpdateResult> result;
62 std::vector<std::string> missingCoreSegmentNames;
63 for (
const auto& [coreSegmentName, updates] : updatesPerCoreSegment)
65 auto it = this->
_container.find(coreSegmentName);
71 coreSegment.
doLocked([&result, &coreSegment, updates = &updates]()
76 Base::UpdateResult
ret { r };
78 result.push_back(
ret);
85 missingCoreSegmentNames.push_back(coreSegmentName);
89 if (not missingCoreSegmentNames.empty())
92 throw armem::error::MissingEntry::create<CoreSegment>(missingCoreSegmentNames.front(), *
this);
99 Memory::Base::UpdateResult
105 Base::UpdateResult result;