[cdi-dev] [JBoss JIRA] (CDI-729) Async event not CompletionStage friendly
Romain Manni-Bucau (JIRA)
issues at jboss.org
Wed Jun 20 04:34:00 EDT 2018
[ https://issues.jboss.org/browse/CDI-729?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13594279#comment-13594279 ]
Romain Manni-Bucau edited comment on CDI-729 at 6/20/18 4:33 AM:
-----------------------------------------------------------------
[~mkouba] how do you embrace the rich semantic without the stage as a param? If you drop it then it means you just use thenCompose which is a very small portion of the API. No acceptEither etc...
If they are notified in parallel you get N stages and can replace the "submitted" stage by the returned one to notify the completion to the caller. This is the goal of the returned instance.
In summary: param = rich compose API with fallback support etc, returned type = enrichment of the "wait" logic of the returned instance to the caller to give caller the guarantee all is done (= same guarantee than in sync mode but reactive style)
was (Author: rmannibucau):
[~mkouba] how do you embrace the rich semantic without the stage as a param? If you drop it then it means you just use thenCompose which is a very small portion of the API. No acceptEither etc...
If they are notified in parallel you get N stages and can replace the "submitted" stage by the returned one to notify the completion to the caller. This is the goal of the returned instance.
In summary: param = rich compose API with fallback support etc, returned type = enrichment of the "wait" logic of the returned instance to the caller to give caller the guarantee all is execpted (= same guarantee than in sync mode but reactive style)
> Async event not CompletionStage friendly
> ----------------------------------------
>
> Key: CDI-729
> URL: https://issues.jboss.org/browse/CDI-729
> Project: CDI Specification Issues
> Issue Type: Feature Request
> Reporter: Romain Manni-Bucau
>
> The goal of this ticket is to enable user to get injected the completion future instead of the raw event and return another completion stage (generic type ignored) to enable the "chain" to be synched.
> Here is a sample:
> 1. fireAsync(persistEvent)
> 2. observer implementation does: return future.thenCompose(db::doAsyncPersist)
> 3. when the user gets back the result of the fireAsync the doAsyncPersist is completed.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the cdi-dev
mailing list