private void addInstanceToMap ( InstanceInfo info , String vipAddresses , Map < String , VipIndexSupport > vipMap ) { if ( vipAddresses != null ) { String [ ] vipAddressArray = vipAddresses . toUpperCase ( Locale . ROOT ) . split ( "," ) ; for ( String vipAddress : vipAddressArray ) { VipIndexSupport vis = vipMap . computeIfAbsent ( vipAddress , k -> new VipIndexSupport ( ) ) ; vis . instances . add ( info ) ; } } }
Add the instance to the given map based if the vip address matches with that of the instance . Note that an instance can be mapped to multiple vip addresses .