void (Project project, boolean wait, Predicate<MavenServerConnector> condition) { List<MavenServerConnector> connectorsToShutDown = new ArrayList<>(); synchronized (myMultimoduleDirToConnectorMap) { getAllConnectors().forEach(it -> { if (project.equals(it.getProject()) && condition.test(it)) { connectorsToShutDown.add(removeConnector(it)); } }); } MavenProjectsManager.getInstance(project).getEmbeddersManager().reset(); MavenServerManagerEx.stopConnectors(project, wait, connectorsToShutDown); }