Interface ClosingFuture.ClosingFunction<T extends @Nullable java.lang.Object,​U extends @Nullable java.lang.Object>

  • Type Parameters:
    T - the type of the input to the function
    U - the type of the result of the function
    Enclosing class:
    ClosingFuture<V extends @Nullable java.lang.Object>
    Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    public static interface ClosingFuture.ClosingFunction<T extends @Nullable java.lang.Object,​U extends @Nullable java.lang.Object>
    A function from an input to a result.
    • Method Detail

      • apply

        U apply​(ClosingFuture.DeferredCloser closer,
                T input)
         throws java.lang.Exception
        Applies this function to an input, or throws an exception if unable to do so.

        Any objects that are passed to closer.eventuallyClose() will be closed when the ClosingFuture pipeline is done (but not before this method completes), even if this method throws or the pipeline is cancelled.

        Throws:
        java.lang.Exception