On Wed, Nov 8, 2017 at 7:57 PM, Robert Varga <[email protected]> wrote: > On 08/11/17 19:43, Michael Vorburger wrote: > > Hello, > > > > I'm trying to understand what the intention of the original designers > > who wrote this was re. what to do with the Future returned by RpcService > > implementations.. as it's not a ListenableFuture, you can't really > > directly chain anything async to it, you can only to a blocking get() > > ... or poll isDone() ? > > > > com.google.common.util.concurrent.JdkFutureAdapters seems to be a Util > > that could be used to turn a Future into a ListenableFuture one can pass > > to com.google.common.util.concurrent.Futures (urgh). In genius & netvirt > > it's just blocking get() everywhere AFAIK. Do other projects use > > JdkFutureAdapters? Or another such utility? > > Unfortunate side-effect of not choosing sides in the API design world > and going with base Java 7. > > JdkFutureAdapters is the correct approach, though, and all > implementations I can recall use either Futures.immediate*Future() or > SettableFuture internally. >
Thanks. I'm going to "sprinkle some sugar" onto this by https://git.opendaylight.org/gerrit/#/c/65383/ for e.g. https://git.opendaylight.org/gerrit/#/c/65384/. BTW: How will these RPC Java interfaces look like in the future Binding v2? Hopefully not Future anymore... > Regards, > Robert > >
_______________________________________________ controller-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/controller-dev
