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

Method setObjectRetentionBudget

pj_runtime/src/DataSourceRuntimeHost.cpp:310–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

308}
309
310void DataSourceRuntimeHost::setObjectRetentionBudget(int64_t time_window_ns, size_t max_memory_bytes) {
311 // Budget the active store (B while paused) so the paused tail stays bounded;
312 // the frozen store is untouched (eviction is push-triggered anyway).
313 ObjectStore* target = object_store_target_.load();
314 for (auto& [_id, binding] : parser_bindings_) {
315 if (!binding.object_topic_id.has_value()) {
316 continue;
317 }
318 target->setRetentionBudget(
319 *binding.object_topic_id,
320 RetentionBudget{.time_window_ns = time_window_ns, .max_memory_bytes = max_memory_bytes});
321 }
322}
323
324void DataSourceRuntimeHost::setObjectStoreTarget(ObjectStore* target) {
325 // Route cbPushMessage's lazy-object push through the swap (it pushed straight

Callers 2

TEST_FFunction · 0.80
workerLoopMethod · 0.80

Calls 2

setRetentionBudgetMethod · 0.80
loadMethod · 0.45

Tested by 1

TEST_FFunction · 0.64