private void readNameToNode ( CoronaSerializer coronaSerializer ) throws IOException { coronaSerializer . readField ( "nameToNode" ) ; // Expecting the START_OBJECT token for nameToNode coronaSerializer . readStartObjectToken ( "nameToNode" ) ; JsonToken current = coronaSerializer . nextToken ( ) ; while ( current != JsonToken . END_OBJECT ) { // nodeName is the key, and the ClusterNode is the value here String nodeName = coronaSerializer . getFieldName ( ) ; ClusterNode clusterNode = new ClusterNode ( coronaSerializer ) ; if ( ! nameToNode . containsKey ( nodeName ) ) { nameToNode . put ( nodeName , clusterNode ) ; } current = coronaSerializer . nextToken ( ) ; } // Done with reading the END_OBJECT token for nameToNode }
Reads the nameToNode map from the JSON stream