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

Method flushSecondaryIntoPrimary

pj_app/src/StreamingSourceManager.cpp:246–257  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void StreamingSourceManager::flushSecondaryIntoPrimary() {
247 // Zero-copy bulk transfer: ObjectStore::flushTo moves every ObjectEntry
248 // from secondary into primary by value-moving the entry (its std::variant
249 // / std::any holds either a shared_ptr or a closure; both transfer with
250 // their captured state intact, so no payload bytes are copied and no lazy
251 // closure is invoked during the flush). Topics matched by descriptor;
252 // lockstep registration in DataSourceRuntimeHost::cbEnsureParserBinding
253 // guarantees compatibility. Topics stay registered on the secondary.
254 if (auto result = secondary_object_store_->flushTo(session_manager_.objectStore()); !result) {
255 qCWarning(lcStream) << "flushSecondaryIntoPrimary failed:" << QString::fromStdString(result.error());
256 }
257}
258
259void StreamingSourceManager::startSession(const QString& plugin_id) {
260 const LoadedDataSource* source_ptr = resolveStreamSource(extensions_, plugin_id);

Callers

nothing calls this directly

Calls 2

objectStoreMethod · 0.80
flushToMethod · 0.45

Tested by

no test coverage detected