private void processQueue ( ) { SoftValue < ? , ? > sv ; while ( ( sv = ( SoftValue < ? , ? > ) queue . poll ( ) ) != null ) { //noinspection SuspiciousMethodCalls map . remove ( sv . key ) ; // we can access private data! } }
Traverses the ReferenceQueue and removes garbage - collected SoftValue objects from the backing map by looking them up using the SoftValue . key data member .