private void flushHotCacheSlot ( SlotReference slot ) { // Iterate over a copy to avoid concurrent modification issues for ( Map . Entry < DeckReference , TrackMetadata > entry : new HashMap < DeckReference , TrackMetadata > ( hotCache ) . entrySet ( ) ) { if ( slot == SlotReference . getSlotReference ( entry . getValue ( ) . trackReference ) ) { logger . debug ( "Evicting cached metadata in response to unmount report {}" , entry . getValue ( ) ) ; hotCache . remove ( entry . getKey ( ) ) ; } } }
Discards any tracks from the hot cache that were loaded from a now - unmounted media slot because they are no longer valid .