mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-22 12:51:09 +02:00
Refactor: Generate CompletableFuture first, then process it
Change-Id: I1ef5961a863b855ce2687fcbacd2159c77cb64ce
This commit is contained in:
parent
69f6663f3a
commit
05abf1388e
@ -325,8 +325,8 @@ public class IntentManager
|
|||||||
(we can also try to update these individually)
|
(we can also try to update these individually)
|
||||||
*/
|
*/
|
||||||
List<CompletableFuture<IntentData>> futures = operations.stream()
|
List<CompletableFuture<IntentData>> futures = operations.stream()
|
||||||
.map(IntentManager.this::createInitialPhase)
|
|
||||||
.map(CompletableFuture::completedFuture)
|
.map(CompletableFuture::completedFuture)
|
||||||
|
.map(x -> x.thenApply(IntentManager.this::createInitialPhase))
|
||||||
.map(x -> x.thenApplyAsync(IntentManager.this::process, workerExecutor))
|
.map(x -> x.thenApplyAsync(IntentManager.this::process, workerExecutor))
|
||||||
.map(x -> x.thenApply(FinalIntentProcessPhase::data))
|
.map(x -> x.thenApply(FinalIntentProcessPhase::data))
|
||||||
.map(x -> x.exceptionally(e -> {
|
.map(x -> x.exceptionally(e -> {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user