On Thu, Aug 31, 2017 at 3:39 PM, Vladimir Ozerov <voze...@gridgain.com>
wrote:

> There is no need to migrate to Java 8 to support CompletableFuture. Create
> separate Maven project and compile it with Java 8 - this is it.
>

Vova, I am not sure I understand. How will it be released?


>
> On Thu, Aug 31, 2017 at 3:28 PM, Dmitry Pavlov <dpavlov....@gmail.com>
> wrote:
>
> > +1 for migrating to java 8.
> >
> > Sincerely,
> > Dmitriy Pavlov
> >
> >
> > On чт, 31 авг. 2017 г., 11:03 Yakov Zhdanov <yzhda...@apache.org> wrote:
> >
> > > CompletableFuture is part of java 8.
> > >
> > > --Yakov
> > >
> > > 2017-08-31 4:46 GMT+03:00 Dmitriy Setrakyan <dsetrak...@apache.org>:
> > >
> > > > Igniters,
> > > >
> > > > I received the following proposal in my blog. I think this is useful.
> > Any
> > > > thoughts?
> > > >
> > > > Please extend IgniteFuture by conversion method to
> CompletableFuture. I
> > > > > bored to write something like this:
> > > >
> > > >
> > > > > asyncCache.invoke(key, entryProcessor);
> > > > > CompletableFuture completableFuture = new CompletableFuture<>();
> > > > > IgniteFuture igniteFuture = asyncCache.future();
> > > > > IgniteInClosure> listener = (IgniteInClosure>)
> completedIgniteFuture
> > > -> {
> > > > > Throwable exception = null;
> > > > > T result = null;
> > > > > try {
> > > > > result = completedIgniteFuture.get();
> > > > > } catch (Throwable t) {
> > > > > exception = t;
> > > > > }
> > > > > if (exception != null) {
> > > > > completableFuture.completeExceptionally(exception);
> > > > > } else {
> > > > > completableFuture.complete(result);
> > > > > }
> > > > > };
> > > > > igniteFuture.listen(listener);
> > > > > return completableFuture;
> > > >
> > >
> >
>

Reply via email to