Skip to content

Commit

Permalink
Deleting from referenced maps async
Browse files Browse the repository at this point in the history
  • Loading branch information
lassetyr committed Mar 22, 2024
1 parent 9891384 commit fde4c70
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/no/rutebanken/anshar/data/SiriRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ protected void enableCache(IMap<SiriObjectStorageKey, T> map, java.util.function
* @param map
* @param linkedMaps
*/
void linkEntriesTtl(IMap<SiriObjectStorageKey, T> map, IMap<String, Set<SiriObjectStorageKey>> linkedChangeMap, Map<SiriObjectStorageKey, ? extends Object>... linkedMaps) {
void linkEntriesTtl(IMap<SiriObjectStorageKey, T> map, IMap<String, Set<SiriObjectStorageKey>> linkedChangeMap, IMap<SiriObjectStorageKey, ? extends Object>... linkedMaps) {
{

// Entry added - new data
Expand Down Expand Up @@ -189,9 +189,9 @@ void linkEntriesTtl(IMap<SiriObjectStorageKey, T> map, IMap<String, Set<SiriObj
}
}

private void removeFromLinked(IMap<String, Set<SiriObjectStorageKey>> linkedChangeMap, EntryEvent<SiriObjectStorageKey, T> entryEvent, Map<SiriObjectStorageKey, ?>[] linkedMaps) {
for (Map<SiriObjectStorageKey, ?> linkedMap : linkedMaps) {
linkedMap.remove(entryEvent.getKey());
private void removeFromLinked(IMap<String, Set<SiriObjectStorageKey>> linkedChangeMap, EntryEvent<SiriObjectStorageKey, T> entryEvent, IMap<SiriObjectStorageKey, ?>[] linkedMaps) {
for (IMap<SiriObjectStorageKey, ?> linkedMap : linkedMaps) {
linkedMap.removeAsync(entryEvent.getKey());
}
for (Set<SiriObjectStorageKey> changes : linkedChangeMap.values()) {
changes.remove(entryEvent.getKey());
Expand Down

0 comments on commit fde4c70

Please sign in to comment.