- Type Parameters:
V- the type of the value of a successful operation
public static final class ClosingFuture.ValueAndCloser<V> extends ObjectAn object that holds the final result of an asynchronous
ClosingFutureoperation and allows the user to close all the closeable objects that were captured during it for later closing.
The asynchronous operation will have completed before this object is created.
public @Nullable V get() throws ExecutionExceptionReturns the final value of the associated
ClosingFuture, or throws an exception as
Because the asynchronous operation has already completed, this method is synchronous and returns immediately.
public void closeAsync()Starts closing all closeable objects captured during the
ClosingFuture's asynchronous operation on the
Executors specified by calls to
If any such calls specified
MoreExecutors.directExecutor(), those objects will be closed synchronously.
Idempotent: objects will be closed at most once.