@ 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 .