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>)
| 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>> { |