private void checkPrefix(final Future<Boolean> aFuture) {
        final String prefixFilePath = getPrefixFilePath();

        myFileSystem.exists(prefixFilePath, result -> {
            if (result.succeeded()) {
                if (hasPrefix()) {
                    if (LOGGER.isDebugEnabled()) {
                        LOGGER.debug(MessageCodes.PT_DEBUG_035, prefixFilePath);
                    }

                    if (result.result()) {
                        aFuture.complete(result.result());
                    } else {
                        aFuture.fail(new PairtreeException(MessageCodes.PT_013, prefixFilePath));
                    }
                } else {
                    LOGGER.debug(MessageCodes.PT_DEBUG_009, prefixFilePath);

                    if (result.result()) {
                        aFuture.fail(new PairtreeException(MessageCodes.PT_014, prefixFilePath));
                    } else {
                        aFuture.complete(!result.result());
                    }
                }
            } else {
                aFuture.fail(result.cause());
            }
        });
    }
private void checkPrefix ( final Future < Boolean > aFuture ) { final String prefixFilePath = getPrefixFilePath ( ) ; myFileSystem . exists ( prefixFilePath , result -> { if ( result . succeeded ( ) ) { if ( hasPrefix ( ) ) { if ( LOGGER . isDebugEnabled ( ) ) { LOGGER . debug ( MessageCodes . PT_DEBUG_035 , prefixFilePath ) ; } if ( result . result ( ) ) { aFuture . complete ( result . result ( ) ) ; } else { aFuture . fail ( new PairtreeException ( MessageCodes . PT_013 , prefixFilePath ) ) ; } } else { LOGGER . debug ( MessageCodes . PT_DEBUG_009 , prefixFilePath ) ; if ( result . result ( ) ) { aFuture . fail ( new PairtreeException ( MessageCodes . PT_014 , prefixFilePath ) ) ; } else { aFuture . complete ( ! result . result ( ) ) ; } } } else { aFuture . fail ( result . cause ( ) ) ; } } ) ; }
Checks whether a Pairtree prefix file exists.

@param aFuture The result of an action that may, or may not, have occurred yet.