public void noteInternMappingsReceived ( Collection < String > sinterns ) { // sanity check if ( _internmap == null ) { throw new RuntimeException ( "Missing intern map" ) ; } // make each intern's code positive to signify that we no longer need to send metadata for ( String sintern : sinterns ) { Short code = _internmap . get ( sintern ) ; if ( code == null ) { throw new RuntimeException ( "No intern mapping for " + sintern ) ; } short scode = code ; if ( scode < 0 ) { _internmap . put ( sintern , ( short ) - code ) ; } } }
Notes that the receiver has received the mappings for a group of interns and thus that from now on only the codes need be sent .