private void filterNodeMap(ConcurrentMap<String,Collection<ClusterNode>> map,final ClusterNode exclNode){
  for (  String cacheName : registeredCaches.keySet()) {
    String maskedName=maskNull(cacheName);
    while (true) {
      Collection<ClusterNode> oldNodes=map.get(maskedName);
      if (oldNodes == null || oldNodes.isEmpty())       break;
      Collection<ClusterNode> newNodes=new ArrayList<>(oldNodes);
      if (!newNodes.remove(exclNode))       break;
      if (map.replace(maskedName,oldNodes,newNodes))       break;
    }
  }
}

private void filterNodeMap ( ConcurrentMap < String , Collection < ClusterNode > > map , final ClusterNode exclNode ) { for ( String cacheName : registeredCaches . keySet ( ) ) { String maskedName = maskNull ( cacheName ) ; while ( true ) { Collection < ClusterNode > oldNodes = map . get ( maskedName ) ; if ( oldNodes == null || oldNodes . isEmpty ( ) ) break ; Collection < ClusterNode > newNodes = new ArrayList < > ( oldNodes ) ; if ( ! newNodes . remove ( exclNode ) ) break ; if ( map . replace ( maskedName , oldNodes , newNodes ) ) break ; } } }
creates a copy of nodes map without the given node .
