Last active
July 15, 2018 22:41
-
-
Save haigopi/9c7163c1407cfe7eaaa4b28b4f7a06ea to your computer and use it in GitHub Desktop.
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
public void initiateOutboundSyncReactor(ConcurrentLinkedQueue<Tuple3<String, String, HttpMethod>> q) { | |
simpleReact. | |
from(q.stream().map(it -> syncMaker.call(q.poll()))). | |
then(resp -> syncMaker.handleSyncResponse(resp)). | |
onFail(e -> syncMaker.handleError(e, e.getValue())); | |
} | |
public void initiateOutboundAsyncReactor(ConcurrentLinkedQueue<Tuple3<String, String, HttpMethod>> q) { | |
simpleReact. | |
fromStream(q.stream().map(it -> FutureConverter.toCompletableFuture(asyncMaker.call(q.peek())))). | |
then(resp -> asyncMaker.handleAsyncResponse(resp)). | |
onFail(e -> asyncMaker.handleError(e, e.getValue())); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment