File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
testprocesses-core/src/main/java/io/github/netmikey/testprocesses Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 1010import java .nio .file .Files ;
1111import java .nio .file .Path ;
1212import java .nio .file .StandardOpenOption ;
13+ import java .util .HashSet ;
1314import java .util .Map ;
1415import java .util .Optional ;
16+ import java .util .Set ;
1517import java .util .concurrent .ConcurrentHashMap ;
1618import java .util .concurrent .TimeoutException ;
1719import java .util .function .BiFunction ;
@@ -441,6 +443,16 @@ public <T extends TestProcessDefinition> Optional<RunningTestProcess<T>> retriev
441443 }
442444 }
443445
446+ /**
447+ * Retrieve a momentary snapshot of all running processes as a {@link Set}
448+ * of their process identifiers.
449+ *
450+ * @return A potentially empty {@link Set} of process identifiers.
451+ */
452+ public Set <String > runningProcessIdentifiers () {
453+ return new HashSet <>(runningProcesses .keySet ());
454+ }
455+
444456 private <T extends TestProcessDefinition > RunningTestProcess <T > retrieveRunningProcessOrElseThrow (
445457 TestProcessDefinitionBy <T > testProcessDefinitionBy ) {
446458
You can’t perform that action at this time.
0 commit comments