CompletionStage instead of Future for Submission#cancel return type?
v at lightbend.com
Fri Nov 24 10:41:45 UTC 2017
I agree, Sebastien—very sensible improvements!
On Thu, Nov 23, 2017 at 4:00 PM, Sebastien Deleuze <sdeleuze at pivotal.io>
> While reviewing ADBA API, I noticed that Submission#cancel returns Future
> , which in practice is mostly usable in a blocking way since get() is
> blocking, checking regularly isDone() is not convenient at all, and
> unlike CompletionStage it does not provide a way to register a complete
> Is there any specific reason why CompletionStage<Boolean> can't be used
> there as return type? In addition to providing a non-blocking API, that
> would be also more consistent.
> I am also not sure about Submission#getCompletionStage method name. Maybe
> something like Submission#getResult would be more clear than just naming it
> against the return type, especially if there are 2 methods returning
> like in my proposal.
> Any thoughts?
More information about the jdbc-spec-discuss