private void addToMap(Map<String,Collection<ClusterNode>> cacheMap,String cacheName,ClusterNode rich){
  Collection<ClusterNode> cacheNodes=cacheMap.get(cacheName);
  if (cacheNodes == null) {
    cacheNodes=new ArrayList<>(allNodes.size());
    cacheMap.put(cacheName,cacheNodes);
  }
  cacheNodes.add(rich);
}

private void addToMap ( Map < String , Collection < ClusterNode > > cacheMap , String cacheName , ClusterNode rich ) { Collection < ClusterNode > cacheNodes = cacheMap . get ( cacheName ) ; if ( cacheNodes == null ) { cacheNodes = new ArrayList < > ( allNodes . size ( ) ) ; cacheMap . put ( cacheName , cacheNodes ) ; } cacheNodes . add ( rich ) ; }
adds node to map .
