private void readHostsToSessions ( CoronaSerializer coronaSerializer ) throws IOException { coronaSerializer . readField ( "hostsToSessions" ) ; // Expecting the START_OBJECT token for hostsToSessions coronaSerializer . readStartObjectToken ( "hostsToSessions" ) ; JsonToken current = coronaSerializer . nextToken ( ) ; while ( current != JsonToken . END_OBJECT ) { String host = coronaSerializer . getFieldName ( ) ; Set < String > sessionsSet = coronaSerializer . readValueAs ( Set . class ) ; hostsToSessions . put ( nameToNode . get ( host ) , sessionsSet ) ; current = coronaSerializer . nextToken ( ) ; } }
Reads the hostsToSessions map from the JSON stream