Class ClosingFuture.Combiner2<V1 extends @Nullable java.lang.Object,​V2 extends @Nullable java.lang.Object>

    • Method Detail

      • call

        public <U extends @Nullable java.lang.Object> ClosingFuture<U> call​(ClosingFuture.Combiner2.ClosingFunction2<V1,​V2,​U> function,
                                                                            java.util.concurrent.Executor executor)
        Returns a new ClosingFuture pipeline step derived from the inputs by applying a combining function to their values. The function can use a ClosingFuture.DeferredCloser to capture objects to be closed when the pipeline is done.

        If this combiner was returned by ClosingFuture.whenAllSucceed(ClosingFuture, ClosingFuture) and any of the inputs fail, so will the returned step.

        If the function throws a CancellationException, the pipeline will be cancelled.

        If the function throws an ExecutionException, the cause of the thrown ExecutionException will be extracted and used as the failure of the derived step.