boolean (@NotNull Repository repository) { REPO_LOCK.readLock().lock(); try { return !myRepositories.containsValue(repository) && myExternalRepositories.containsValue(repository); } finally { REPO_LOCK.readLock().unlock(); } }