Return all replica IDs that have acked `array`.
(&self, array: &str)
| 252 | |
| 253 | /// Return all replica IDs that have acked `array`. |
| 254 | pub fn all_replicas(&self, array: &str) -> Vec<ReplicaId> { |
| 255 | let cache = self.cache.read().unwrap_or_else(|p| p.into_inner()); |
| 256 | if let Some(av) = cache.get(array) { |
| 257 | av.replicas().collect() |
| 258 | } else { |
| 259 | Vec::new() |
| 260 | } |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | // ─── Tests ──────────────────────────────────────────────────────────────────── |