docs: private boolean waitForAvailabilityInternal() {
        final Directory directory = indexManager.getDirectoryProvider().getDirectory();
        try {
           Lock lock = directory.obtainLock(IndexWriter.WRITE_LOCK_NAME);
           lock.close();
           return true;
        } catch (LockObtainFailedException lofe) {
           return false;
        } catch (IOException e) {
           log.error(e);
           return false;
        }
     }