Package com.mrivanplays.process
Class ProcessesCompletion
java.lang.Object
com.mrivanplays.process.ProcessesCompletion
Represents a completion of all the processes.
- Since:
- 0.0.1
- Author:
- Ivan Pekov
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
whenAllDone
(boolean async, Consumer<Set<ProcessException>> callback, ProcessesCompletion... completions) Runs the specifiedcallback
when all the specifiedcompletions
complete.void
whenDone
(Consumer<Set<ProcessException>> callback) Called when allProccesses
are done.void
whenDoneAsync
(Consumer<Set<ProcessException>> callback) Called when allProcesses
are done.
-
Method Details
-
whenAllDone
public static void whenAllDone(boolean async, Consumer<Set<ProcessException>> callback, ProcessesCompletion... completions) Runs the specifiedcallback
when all the specifiedcompletions
complete.- Parameters:
async
- whether this method to be called asynchronously or notcallback
- aConsumer
of the errors (if any). if there are no errors, the value will be an empty set.completions
- completions to wait for
-
whenDone
Called when allProccesses
are done.WARNING: THREAD BLOCKING METHOD.
- Parameters:
callback
- aConsumer
of the errors (if any). if there are no errors, the value will be an empty set.
-
whenDoneAsync
Called when allProcesses
are done. The difference fromwhenDone(Consumer)
is that the waiting and thecallback
call is done asynchronously.- Parameters:
callback
- seewhenDone(Consumer)
- See Also:
-