addons/promote/common/src/main/java/org/commonjava/indy/promote/data/PromotionManager.java
private void clearStoreNFC( final Set<String> sourcePaths, ArtifactStore store )
            throws IndyDataException
    {
        Set<String> paths = sourcePaths.stream()
                                       .map( sp -> sp.startsWith( "/" ) && sp.length() > 1 ? sp.substring( 1 ) : sp )
                                       .collect( Collectors.toSet() );

        paths.forEach( path -> {
            ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( store ), path );

            logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, store.getKey(), resource );
            nfc.clearMissing( resource );
        } );

        Set<Group> groups = storeManager.query().getGroupsAffectedBy( store.getKey() );
        if ( groups != null )
        {
            groups.forEach( group -> paths.forEach( path -> {
                ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( group ), path );

                logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, group.getKey(), resource );
                nfc.clearMissing( resource );
            } ) );
        }
    }
private void clearStoreNFC( final Set<String> sourcePaths, ArtifactStore store )
            throws IndyDataException
    {
        Set<String> paths = sourcePaths.stream()
                                       .map( sp -> sp.startsWith( "/" ) && sp.length() > 1 ? sp.substring( 1 ) : sp )
                                       .collect( Collectors.toSet() );

        paths.forEach( path -> {
            ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( store ), path );

            logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, store.getKey(), resource );
            nfc.clearMissing( resource );
        } );

        Set<Group> groups = storeManager.query().getGroupsAffectedBy( store.getKey() );
        if ( groups != null )
        {
            groups.forEach( group -> paths.forEach( path -> {
                ConcreteResource resource = new ConcreteResource( LocationUtils.toLocation( group ), path );

                logger.debug( "Clearing NFC path: {} from: {}\n\tResource: {}", path, group.getKey(), resource );
                nfc.clearMissing( resource );
            } ) );
        }
    }
private void clearStoreNFC ( final Set < String > sourcePaths , ArtifactStore store ) throws IndyDataException { Set < String > paths = sourcePaths . stream ( ) . map ( sp -> sp . startsWith ( "/" ) && sp . length ( ) > 1 ? sp . substring ( 1 ) : sp ) . collect ( Collectors . toSet ( ) ) ; paths . forEach ( path -> { ConcreteResource resource = new ConcreteResource ( LocationUtils . toLocation ( store ) , path ) ; logger . debug ( "Clearing NFC path: {} from: {}\n\tResource: {}" , path , store . getKey ( ) , resource ) ; nfc . clearMissing ( resource ) ; } ) ; Set < Group > groups = storeManager . query ( ) . getGroupsAffectedBy ( store . getKey ( ) ) ; if ( groups != null ) { groups . forEach ( group -> paths . forEach ( path -> { ConcreteResource resource = new ConcreteResource ( LocationUtils . toLocation ( group ) , path ) ; logger . debug ( "Clearing NFC path: {} from: {}\n\tResource: {}" , path , group . getKey ( ) , resource ) ; nfc . clearMissing ( resource ) ; } ) ) ; } }
NOTE: Adding sourcePaths parameter here to cut down on number of paths for clearing from NFC.

@param sourcePaths The set of paths that need to be cleared from the NFC.
@param store The store whose affected groups should have their NFC entries cleared
@throws IndyDataException
NOTE : Adding sourcePaths parameter here to cut down on number of paths for clearing from NFC .