private void fillConfMap ( Map < PropertyKey , Map < Optional < String > , List < String > > > targetMap , Map < Address , List < ConfigRecord > > recordMap ) { for ( Map . Entry < Address , List < ConfigRecord > > record : recordMap . entrySet ( ) ) { Address address = record . getKey ( ) ; String addressStr = String . format ( "%s:%s" , address . getHost ( ) , address . getRpcPort ( ) ) ; for ( ConfigRecord conf : record . getValue ( ) ) { PropertyKey key = conf . getKey ( ) ; if ( key . getConsistencyLevel ( ) == ConsistencyCheckLevel . IGNORE ) { continue ; } Optional < String > value = conf . getValue ( ) ; targetMap . putIfAbsent ( key , new HashMap <> ( ) ) ; Map < Optional < String > , List < String > > values = targetMap . get ( key ) ; values . putIfAbsent ( value , new ArrayList <> ( ) ) ; values . get ( value ) . add ( addressStr ) ; } } }
Fills the configuration map .