protected Map<URI,Boolean> flagInitiatorsThatArePartOfAFullList(ExportGroup exportGroup,List<URI> initiatorURIs){
  Map<URI,Boolean> initiatorFlagMap=new HashMap<URI,Boolean>();
  if (exportGroup.forCluster() || exportGroup.forHost()) {
    Map<String,List<URI>> computeResourceMapForRequest=mapInitiatorsToComputeResource(exportGroup,initiatorURIs);
    Collection<URI> egInitiators=Collections2.transform(exportGroup.getInitiators(),CommonTransformerFunctions.FCTN_STRING_TO_URI);
    Map<String,List<URI>> computeResourcesMapForExport=mapInitiatorsToComputeResource(exportGroup,egInitiators);
    for (    Map.Entry<String,List<URI>> computeResource : computeResourcesMapForExport.entrySet()) {
      List<URI> initiatorsForComputeResource=computeResource.getValue();
      List<URI> initiatorsInRequest=computeResourceMapForRequest.get(computeResource.getKey());
      if (initiatorsInRequest != null) {
        initiatorsForComputeResource.removeAll(initiatorsInRequest);
        Boolean isFullList=(initiatorsForComputeResource.isEmpty());
        for (        URI uri : initiatorsInRequest) {
          initiatorFlagMap.put(uri,isFullList);
        }
      }
    }
  }
  for (  URI uri : initiatorURIs) {
    if (!initiatorFlagMap.containsKey(uri)) {
      initiatorFlagMap.put(uri,Boolean.FALSE);
    }
  }
  return initiatorFlagMap;
}

protected Map < URI , Boolean > flagInitiatorsThatArePartOfAFullList ( ExportGroup exportGroup , List < URI > initiatorURIs ) { Map < URI , Boolean > initiatorFlagMap = new HashMap < URI , Boolean > ( ) ; if ( exportGroup . forCluster ( ) || exportGroup . forHost ( ) ) { Map < String , List < URI > > computeResourceMapForRequest = mapInitiatorsToComputeResource ( exportGroup , initiatorURIs ) ; Collection < URI > egInitiators = Collections2 . transform ( exportGroup . getInitiators ( ) , CommonTransformerFunctions . FCTN_STRING_TO_URI ) ; Map < String , List < URI > > computeResourcesMapForExport = mapInitiatorsToComputeResource ( exportGroup , egInitiators ) ; for ( Map . Entry < String , List < URI > > computeResource : computeResourcesMapForExport . entrySet ( ) ) { List < URI > initiatorsForComputeResource = computeResource . getValue ( ) ; List < URI > initiatorsInRequest = computeResourceMapForRequest . get ( computeResource . getKey ( ) ) ; if ( initiatorsInRequest != null ) { initiatorsForComputeResource . removeAll ( initiatorsInRequest ) ; Boolean isFullList = ( initiatorsForComputeResource . isEmpty ( ) ) ; for ( URI uri : initiatorsInRequest ) { initiatorFlagMap . put ( uri , isFullList ) ; } } } } for ( URI uri : initiatorURIs ) { if ( ! initiatorFlagMap . containsKey ( uri ) ) { initiatorFlagMap . put ( uri , Boolean . FALSE ) ; } } return initiatorFlagMap ; }
function will examine the exportgroup ' s initiators and the initiatoruris list . a mapping of initiator uri to a boolean flag will be returned . if the flag is = = boolean . true , then it implies that the initiator is part of a full list of initiators for a compute resource . otherwise , it will be = = boolean . false . example : say exportgroup points to 2 hosts , each having 2 initiators for a total of 4 initiators : { h1i1 , h1i2 , h2i1 , h2i2 } if the call is flaginitiatorsthatarepartofafulllist ( exportgroup , { h1i1 , h1i2 , h2i1 } ) then the resultant mapping will be : { { h1i1 - > true } , { h1i2 - > true } , { h2i1 - > false } } if the call is flaginitiatorsthatarepartofafulllist ( exportgroup , { h1i1 , h2i1 } ) then the resultant mapping will be : { { h1i1 - > false } , { h2i1 - > false } }
