-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NCL-6344] Implement Supplier interface (#603)
Implement Supplier interface for `BuildFinder` and `DistributionAnalyzer`. This is useful when invoking both of them in a `CompletableFuture.supplyAsync` to produce a `CompletableFuture`. The latter can then be composed and combined with other `CompletableFuture`s. One reason for using that composability for NCL-6344 is to implement a cancellation feature. The flow goes from: url -> DistributionAnalyzer -> BuildFinder When running `DistributionAnalyzer` and `BuildFinder` as a future, it is really impossible to stop them in case of cancellation. However, we can cancel the rest of the flow after them. url -> future(DistributionAnalyzer) -> check if cancelled -> future(BuildFinder) Using a `CompletableFuture` makes this much easier.
- Loading branch information
1 parent
7446187
commit be2329d
Showing
2 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters