Class ClosingFuture.ValueAndCloser<V>

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void closeAsync()
      Starts closing all closeable objects captured during the ClosingFuture's asynchronous operation on the s specified by calls to DeferredCloser#eventuallyClose(Closeable, Executor).
      V get()
      Returns the final value of the associated ClosingFuture, or throws an exception as would.
      • Methods inherited from class java.lang.

        , , , , , , , , , ,
    • Method Detail

      • get

        public  V get()
                        throws 
        Returns the final value of the associated ClosingFuture, or throws an exception as would.

        Because the asynchronous operation has already completed, this method is synchronous and returns immediately.

        Throws:
        - if the computation was cancelled
        - if the computation threw an exception
      • closeAsync

        public void closeAsync()
        Starts closing all closeable objects captured during the ClosingFuture's asynchronous operation on the s specified by calls to DeferredCloser#eventuallyClose(Closeable, Executor).

        If any such calls specified MoreExecutors.directExecutor(), those objects will be closed synchronously.

        Idempotent: objects will be closed at most once.