15 data::AddSegmentResult
17 const std::string& providerSegmentName,
18 bool clearWhenExists)
const
20 data::AddSegmentInput
input;
21 input.coreSegmentName = coreSegmentName;
22 input.providerSegmentName = providerSegmentName;
23 input.clearWhenExists = clearWhenExists;
27 data::AddSegmentResult
35 data::AddSegmentResult
41 data::AddSegmentResult
49 data::AddSegmentsResult
53 data::AddSegmentsResult results =
memory->addSegments(inputs);
63 data::Commit commitIce;
66 data::CommitResult resultIce = this->_commit(commitIce);
77 data::Commit
commit = _commit;
78 return this->_commit(
commit);
94 const std::vector<aron::data::DictPtr>& instancesData,
95 Time referencedTime)
const
98 update.entityID = entityID;
99 update.instancesData = instancesData;
100 update.referencedTime = referencedTime;
111 Writer::_commit(data::Commit& commit)
const
130 data::CommitResult result;
131 auto handleError = [&
commit, &result](
const std::string& what)
133 for (
const auto& _ :
commit.updates)
136 data::EntityUpdateResult& r = result.results.emplace_back();
138 r.errorMessage =
"Memory component not registered.\n" + std::string(what);
146 catch (
const Ice::ConnectionRefusedException& e)
148 handleError(e.what());
150 catch (
const Ice::ConnectionLostException& e)
152 handleError(e.what());
154 catch (
const Ice::NotRegisteredException& e)
156 handleError(e.what());
166 return os <<
"AddSegmentInput: "
167 <<
"\n- core segment: \t'" << rhs.coreSegmentName <<
"'"
168 <<
"\n- provider segment: \t'" << rhs.providerSegmentName <<
"'"
169 <<
"\n- clear when exists:\t" << rhs.clearWhenExists <<
""
176 for (
size_t i = 0; i < rhs.size(); ++i)
178 os <<
"[" << i <<
"] " << rhs[i];
186 return os <<
"AddSegmentResult:"
187 <<
"\n- success: \t" << rhs.success <<
"\n- segment ID: \t'" << rhs.segmentID
189 <<
"\n- error message: \t" << rhs.errorMessage <<
"\n";
195 for (
size_t i = 0; i < rhs.size(); ++i)
197 os <<
"[" << i <<
"] " << rhs[i];