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());