indy-repository-manager/src/main/java/org/jboss/pnc/indyrepositorymanager/IndyRunningDeletion.java
@Override
    public void monitor(Consumer<CompletedRepositoryDeletion> onComplete, Consumer<Exception> onError) {
        try {
            StoreKey fromKey = new StoreKey(pakageType, fromType, fromId);
            if (indy.stores().exists(fromKey)) {
                indy.stores().delete(fromKey, "Deleting artifacts for PNC build");
            }

            onComplete.accept(new IndyCompletedDeletion(true));

        } catch (IndyClientException e) {
            onError.accept(e);
        }
    }
@Override
    public void monitor(Consumer<CompletedRepositoryDeletion> onComplete, Consumer<Exception> onError) {
        try {
            StoreKey fromKey = new StoreKey(pakageType, fromType, fromId);
            if (indy.stores().exists(fromKey)) {
                indy.stores().delete(fromKey, "Deleting artifacts for PNC build");
            }

            onComplete.accept(new IndyCompletedDeletion(true));

        } catch (IndyClientException e) {
            onError.accept(e);
        }
    }
@ Override public void monitor ( Consumer < CompletedRepositoryDeletion > onComplete , Consumer < Exception > onError ) { try { StoreKey fromKey = new StoreKey ( pakageType , fromType , fromId ) ; if ( indy . stores ( ) . exists ( fromKey ) ) { indy . stores ( ) . delete ( fromKey , "Deleting artifacts for PNC build" ) ; } onComplete . accept ( new IndyCompletedDeletion ( true ) ) ; } catch ( IndyClientException e ) { onError . accept ( e ) ; } }
Trigger the repository deletion configured for this instance, and send the result to the appropriate consumer.

@param onComplete The consumer which will handle non-error results
@param onError Handles errors
Trigger the repository deletion configured for this instance and send the result to the appropriate consumer .