private boolean spaceExists ( final StorageProvider store , final String spaceId ) throws TaskExecutionFailedException { try { return new Retrier ( ) . execute ( new Retriable ( ) { @ Override public Boolean retry ( ) throws Exception { // The actual method being executed store . getSpaceProperties ( spaceId ) ; return true ; } } ) ; } catch ( NotFoundException nfe ) { return false ; } catch ( Exception e ) { String msg = "Error attempting to check if space exists: " + e . getMessage ( ) ; throw new DuplicationTaskExecutionFailedException ( buildFailureMessage ( msg ) , e ) ; } }
Determines if a space in the given store exists .