Le dim. 21 mars 2021 à 22:16, Jean-Noël Rouvignac (ForgeRock) < [email protected]> a écrit :
> Le dim. 21 mars 2021 à 08:13, Andrew Gaul <[email protected]> a écrit : > >> On Thu, Mar 18, 2021 at 10:39:05AM +0100, Jean-Noėl Rouvignac (ForgeRock) >> wrote: >> > I have started looking at ListenableFuture. >> > TBH I don't know where to start! A lot of things are public, so I don't >> > think I can change them straight from ListenableFuture to >> CompletableFuture? >> > They are also often used in conjunction with ListeningExecutorService >> which >> > makes the problem worse. >> >> Ugh, I incorrectly believed that ListenableFuture inherited from >> CompletableFuture but instead they both inherit from Future. There does >> not seem to be an easy path forward here. In the past we have done some >> heavyweight @Deprecate-and-change-the-interface changes but these are a >> lot of work. I would add that the only important ones to change are the >> interfaces, not the implementation. Thus something like >> >> ListenableFuture<ExecResponse> >> BaseComputeService.submitScriptOnNode(String id, String runScript, >> RunScriptOptions options) >> >> is problematic but >> >> Set<? extends NodeMetadata> >> BaseComputeService.resumeNodesMatching(Predicate<? super NodeMetadata> >> filter) >> >> is not. In an ideal future Guava would be an implementation detail and >> not part of the interface >> > Here is my first attempt, but I am afraid this may be API breaking: https://github.com/apache/jclouds/pull/102 LEt me know what you think. -- ForgeRock values your Privacy <https://www.forgerock.com/your-privacy>