MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / insert

Method insert

nodedb/src/control/mirror/registry.rs:77–80  ·  view source on GitHub ↗

Register an active link for `db_id`. Overwrites any previous entry. `last_received_ms` is initialised to the current wall-clock time so a freshly registered link is treated as fresh until the next monitor tick.

(&self, db_id: DatabaseId, link: Arc<CrossClusterLink>)

Source from the content-addressed store, hash-verified

75 /// `last_received_ms` is initialised to the current wall-clock time so a
76 /// freshly registered link is treated as fresh until the next monitor tick.
77 pub fn insert(&self, db_id: DatabaseId, link: Arc<CrossClusterLink>) {
78 let mut w = self.entries.write().unwrap_or_else(|p| p.into_inner());
79 w.insert(db_id.as_u64(), Arc::new(MirrorLinkEntry::new(link)));
80 }
81
82 /// Remove and return the link for `db_id`, if any.
83 pub fn remove(&self, db_id: DatabaseId) -> Option<Arc<CrossClusterLink>> {

Callers 15

merge_traversal_resultsFunction · 0.45
registerMethod · 0.45
create_topicMethod · 0.45
subscribeMethod · 0.45
recordMethod · 0.45
set_tenant_limitsMethod · 0.45
compile_statementsFunction · 0.45
compile_forFunction · 0.45

Calls 2

writeMethod · 0.45
as_u64Method · 0.45