public void invalidateExportMask(URI uri){
  masks.remove(uri);
  maskExportGroupMap.remove(uri);
  Map<URI,Volume> leftoverMaskToVolumes=maskToVolumes.remove(uri);
  Map<URI,Volume> tentativelyUnplacedVolumes=(null != leftoverMaskToVolumes) ? leftoverMaskToVolumes : new HashMap<URI,Volume>();
  for (  URI exportURI : maskToVolumes.keySet()) {
    Map<URI,Volume> volumeMap=maskToVolumes.get(exportURI);
    for (    URI volumeURI : volumeMap.keySet()) {
      if (tentativelyUnplacedVolumes.containsKey(volumeURI)) {
        tentativelyUnplacedVolumes.remove(volumeURI);
      }
    }
  }
  if (!tentativelyUnplacedVolumes.isEmpty()) {
    unplacedVolumes.putAll(tentativelyUnplacedVolumes);
  }
  for (  URI volumeURI : volumeToAlternativeMasks.keySet()) {
    Set<URI> altMaskURIs=volumeToAlternativeMasks.get(volumeURI);
    if (altMaskURIs != null) {
      altMaskURIs.remove(uri);
    }
  }
  for (  String key : equivalentMasks.keySet()) {
    Set<URI> eqMaskURIs=equivalentMasks.get(key);
    if (eqMaskURIs != null) {
      eqMaskURIs.remove(uri);
    }
  }
}

public void invalidateExportMask ( URI uri ) { masks . remove ( uri ) ; maskExportGroupMap . remove ( uri ) ; Map < URI , Volume > leftoverMaskToVolumes = maskToVolumes . remove ( uri ) ; Map < URI , Volume > tentativelyUnplacedVolumes = ( null != leftoverMaskToVolumes ) ? leftoverMaskToVolumes : new HashMap < URI , Volume > ( ) ; for ( URI exportURI : maskToVolumes . keySet ( ) ) { Map < URI , Volume > volumeMap = maskToVolumes . get ( exportURI ) ; for ( URI volumeURI : volumeMap . keySet ( ) ) { if ( tentativelyUnplacedVolumes . containsKey ( volumeURI ) ) { tentativelyUnplacedVolumes . remove ( volumeURI ) ; } } } if ( ! tentativelyUnplacedVolumes . isEmpty ( ) ) { unplacedVolumes . putAll ( tentativelyUnplacedVolumes ) ; } for ( URI volumeURI : volumeToAlternativeMasks . keySet ( ) ) { Set < URI > altMaskURIs = volumeToAlternativeMasks . get ( volumeURI ) ; if ( altMaskURIs != null ) { altMaskURIs . remove ( uri ) ; } } for ( String key : equivalentMasks . keySet ( ) ) { Set < URI > eqMaskURIs = equivalentMasks . get ( key ) ; if ( eqMaskURIs != null ) { eqMaskURIs . remove ( uri ) ; } } }
remove references to the exportmask in internal data structures
