From fde4c7092d1fe05ef6de266b1f5718a970ef160c Mon Sep 17 00:00:00 2001 From: Lasse Tyrihjell Date: Fri, 22 Mar 2024 08:10:53 +0100 Subject: [PATCH] Deleting from referenced maps async --- .../java/no/rutebanken/anshar/data/SiriRepository.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/no/rutebanken/anshar/data/SiriRepository.java b/src/main/java/no/rutebanken/anshar/data/SiriRepository.java index 8d0d27285..8c1ab2938 100644 --- a/src/main/java/no/rutebanken/anshar/data/SiriRepository.java +++ b/src/main/java/no/rutebanken/anshar/data/SiriRepository.java @@ -159,7 +159,7 @@ protected void enableCache(IMap map, java.util.function * @param map * @param linkedMaps */ - void linkEntriesTtl(IMap map, IMap> linkedChangeMap, Map... linkedMaps) { + void linkEntriesTtl(IMap map, IMap> linkedChangeMap, IMap... linkedMaps) { { // Entry added - new data @@ -189,9 +189,9 @@ void linkEntriesTtl(IMap map, IMap> linkedChangeMap, EntryEvent entryEvent, Map[] linkedMaps) { - for (Map linkedMap : linkedMaps) { - linkedMap.remove(entryEvent.getKey()); + private void removeFromLinked(IMap> linkedChangeMap, EntryEvent entryEvent, IMap[] linkedMaps) { + for (IMap linkedMap : linkedMaps) { + linkedMap.removeAsync(entryEvent.getKey()); } for (Set changes : linkedChangeMap.values()) { changes.remove(entryEvent.getKey());