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 voidwhenAllDone(boolean async, Consumer<Set<ProcessException>> callback, ProcessesCompletion... completions) Runs the specifiedcallbackwhen all the specifiedcompletionscomplete.voidwhenDone(Consumer<Set<ProcessException>> callback) Called when allProccessesare done.voidwhenDoneAsync(Consumer<Set<ProcessException>> callback) Called when allProcessesare done.
-
Method Details
-
whenAllDone
public static void whenAllDone(boolean async, Consumer<Set<ProcessException>> callback, ProcessesCompletion... completions) Runs the specifiedcallbackwhen all the specifiedcompletionscomplete.- Parameters:
async- whether this method to be called asynchronously or notcallback- aConsumerof the errors (if any). if there are no errors, the value will be an empty set.completions- completions to wait for
-
whenDone
Called when allProccessesare done.WARNING: THREAD BLOCKING METHOD.
- Parameters:
callback- aConsumerof the errors (if any). if there are no errors, the value will be an empty set.
-
whenDoneAsync
Called when allProcessesare done. The difference fromwhenDone(Consumer)is that the waiting and thecallbackcall is done asynchronously.- Parameters:
callback- seewhenDone(Consumer)- See Also:
-